Add option MAIN_SHOW_PASSWORD_INTO_LOG

This commit is contained in:
Laurent Destailleur
2021-05-09 22:07:08 +02:00
parent a349f6c6e7
commit 19bae333c9

View File

@@ -1386,7 +1386,9 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
return;
}
if (empty($conf->global->MAIN_SHOW_PASSWORD_INTO_LOG)) {
$message = preg_replace('/password=\'[^\']*\'/', 'password=\'hidden\'', $message); // protection to avoid to have value of password in log
}
// If adding log inside HTML page is required
if ((!empty($_REQUEST['logtohtml']) && !empty($conf->global->MAIN_ENABLE_LOG_TO_HTML))