forked from Wavyzz/dolibarr
Enhance the protection on missing permissions
This commit is contained in:
@@ -662,7 +662,7 @@ class CodingPhpTest extends CommonClassTest
|
||||
$filecontentaction = $filecontent;
|
||||
}
|
||||
|
||||
preg_match_all('/if\s*\(\s*\$action\s*==\s*[\'"][a-z]+[\'"].*/', $filecontentaction, $matches, PREG_SET_ORDER);
|
||||
preg_match_all('/if.*\(\s*\$action\s*==\s*[\'"][a-z]+[\'"].*/', $filecontentaction, $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $key => $val) {
|
||||
if (!preg_match('/\$user->hasR/', $val[0])
|
||||
&& !preg_match('/\$permission/', $val[0])
|
||||
|
||||
Reference in New Issue
Block a user