Fix : bug with object id -1 in security check
This commit is contained in:
Laurent Destailleur 2023-06-15 11:39:50 +02:00 committed by GitHub
commit 1c2f307812
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -353,6 +353,9 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '',
} else {
$objectid = $object; // $objectid can be X or 'X,Y,Z'
}
if ($objectid == "-1") {
$objectid = 0;
}
if ($objectid) {
$objectid = preg_replace('/[^0-9\.\,]/', '', $objectid); // For the case value is coming from a non sanitized user input
}