Merge pull request #25105 from Hystepik/develop_v17#1
Fix : bug with object id -1 in security check
This commit is contained in:
commit
1c2f307812
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue