This commit is contained in:
Laurent Destailleur
2024-10-19 14:56:14 +02:00

View File

@@ -10575,7 +10575,8 @@ function dol_eval($s, $returnvalue = 1, $hideerrors = 1, $onlysimplestring = '1'
$forbiddenphpstrings = array_merge($forbiddenphpstrings, array('_ENV', '_SESSION', '_COOKIE', '_GET', '_POST', '_REQUEST', 'ReflectionFunction'));
$forbiddenphpfunctions = array();
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("base64_decode", "rawurldecode", "urldecode", "str_rot13", "hex2bin")); // decode string functions used to obfuscated function name
// @phpcs:ignore
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("base64"."_"."decode", "rawurl"."decode", "url"."decode", "str"."_rot13", "hex"."2bin")); // name of forbidden functions are split to avoid false positive
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("fopen", "file_put_contents", "fputs", "fputscsv", "fwrite", "fpassthru", "require", "include", "mkdir", "rmdir", "symlink", "touch", "unlink", "umask"));
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("override_function", "session_id", "session_create_id", "session_regenerate_id"));
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("get_defined_functions", "get_defined_vars", "get_defined_constants", "get_declared_classes"));
@@ -13302,7 +13303,7 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '', $us
return $objecttmp; // returned an object without fetch
}
} else {
dol_syslog($element_prop['classname'].' doesn not exists in '.'/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php');
dol_syslog($element_prop['classname'].' doesn not exists in /'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php');
return -1;
}
}