FIX Generic substitution of constant disabled for sensitive constant
This commit is contained in:
parent
619e0d3792
commit
a5b1f114c2
@ -5685,7 +5685,8 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null)
|
|||||||
if (dol_textishtml($text,1)) $msgishtml = 1;
|
if (dol_textishtml($text,1)) $msgishtml = 1;
|
||||||
|
|
||||||
$keyfound = $reg[1];
|
$keyfound = $reg[1];
|
||||||
$newval=empty($conf->global->$keyfound)?'':$conf->global->$keyfound;
|
if (preg_match('/(_pass|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);
|
$text = preg_replace('/__\['.preg_quote($keyfound, '/').'\]__/', $msgishtml?dol_htmlentitiesbr($newval):$newval, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user