mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-22 17:31:25 +01:00
FIX doleval with @
This commit is contained in:
@@ -8599,7 +8599,8 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
|
||||
if ($onlysimplestring == '1') {
|
||||
// We must accept: '1 && getDolGlobalInt("doesnotexist1") && $conf->global->MAIN_FEATURES_LEVEL'
|
||||
// We must accept: '$conf->barcode->enabled && preg_match(\'/^(AAA|BBB)/\',$leftmenu)'
|
||||
if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+-.*>&|=!?():"\',/', '/').']/i', $s)) {
|
||||
// We must accept: '$user->rights->cabinetmed->read && $object->canvas=="patient@cabinetmed"'
|
||||
if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+-.*>&|=!?():"\',/@', '/').']/i', $s)) {
|
||||
if ($returnvalue) {
|
||||
return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s;
|
||||
} else {
|
||||
@@ -9020,6 +9021,7 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type,
|
||||
if ($values[0] != $type) {
|
||||
continue;
|
||||
}
|
||||
//var_dump(verifCond($values[4]));
|
||||
|
||||
if (verifCond($values[4])) {
|
||||
if ($values[3]) {
|
||||
|
||||
Reference in New Issue
Block a user