Fix : bug with object id -1 in security check

This commit is contained in:
Hystepik 2023-06-15 11:29:14 +02:00
parent 1fab0431cb
commit 6607dda4a7

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
}