2
0
forked from Wavyzz/dolibarr

Fix Add '_pw' var as var sensibles.

This commit is contained in:
Laurent Destailleur
2020-05-06 04:03:07 +02:00
parent 8512fba7db
commit 30fede216c
3 changed files with 3 additions and 3 deletions

View File

@@ -6523,7 +6523,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null)
if (dol_textishtml($text, 1)) $msgishtml = 1;
$keyfound = $reg[1];
if (preg_match('/(_pass|password|secret|_key|key$)/i', $keyfound)) $newval = '*****forbidden*****';
if (preg_match('/(_pass|_pw|password|secret|_key|key$)/i', $keyfound)) $newval = '*****forbidden*****';
else $newval = empty($conf->global->$keyfound) ? '' : $conf->global->$keyfound;
$text = preg_replace('/__\['.preg_quote($keyfound, '/').'\]__/', $msgishtml ?dol_htmlentitiesbr($newval) : $newval, $text);
}