Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 15.0

This commit is contained in:
Laurent Destailleur 2022-03-16 20:05:50 +01:00
commit 4ec0804f84
2 changed files with 4 additions and 6 deletions

View File

@ -8213,7 +8213,7 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
// Test dangerous char (used for RCE), we allow only PHP variable testing. // Test dangerous char (used for RCE), we allow only PHP variable testing.
if ($onlysimplestring == '1') { if ($onlysimplestring == '1') {
//print preg_quote('$_->&|', '/'); //print preg_quote('$_->&|', '/');
if (preg_match('/[^a-z0-9\s'.preg_quote('$_->&|=!?():"', '/').']/i', $s)) { if (preg_match('/[^a-z0-9\s'.preg_quote('$_+->&|=!?():"', '/').']/i', $s)) {
if ($returnvalue) { if ($returnvalue) {
return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s; return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s;
} else { } else {
@ -8223,7 +8223,7 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
} }
} elseif ($onlysimplestring == '2') { } elseif ($onlysimplestring == '2') {
//print preg_quote('$_->&|', '/'); //print preg_quote('$_->&|', '/');
if (preg_match('/[^a-z0-9\s'.preg_quote('^$_->&|=!?():"\';,/', '/').']/i', $s)) { if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+->&|=!?():"\';,/', '/').']/i', $s)) {
if ($returnvalue) { if ($returnvalue) {
return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s; return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s;
} else { } else {

View File

@ -119,11 +119,9 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
} }
// For multicompany // For multicompany
/* if (!empty($out) && !empty($conf->multicompany->enabled)) {
if (!empty($out)) { $out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities
$out .= "&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities
} }
*/
return $out; return $out;
} }