2
0
forked from Wavyzz/dolibarr

Disallow $_ into php code.

This commit is contained in:
Laurent Destailleur
2024-07-23 16:19:08 +02:00
parent 5a7319664e
commit 56ed17a2c4

View File

@@ -10312,7 +10312,7 @@ function dol_eval($s, $returnvalue = 1, $hideerrors = 1, $onlysimplestring = '1'
}
// We block use of php exec or php file functions
$forbiddenphpstrings = array('$$');
$forbiddenphpstrings = array('$$', '$_');
$forbiddenphpstrings = array_merge($forbiddenphpstrings, array('_ENV', '_SESSION', '_COOKIE', '_GET', '_POST', '_REQUEST', 'ReflectionFunction'));
$forbiddenphpfunctions = array("exec", "passthru", "shell_exec", "system", "proc_open", "popen");