Merge pull request #14448 from 418sec/develop

Security Fix for Cross-site Scripting (XSS) - huntr.dev
This commit is contained in:
Laurent Destailleur 2020-08-14 03:17:35 +02:00 committed by GitHub
commit 74da63c0e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3850,7 +3850,7 @@ function dol_print_error($db = '', $error = '', $errors = null)
{
$out .= "<b>".$langs->trans("OS").":</b> ".php_uname()."<br>\n";
}
$out .= "<b>".$langs->trans("UserAgent").":</b> ".$_SERVER["HTTP_USER_AGENT"]."<br>\n";
$out .= "<b>".$langs->trans("UserAgent").":</b> ".dol_htmlentities($_SERVER["HTTP_USER_AGENT"], ENT_COMPAT, 'UTF-8')."<br>\n";
$out .= "<br>\n";
$out .= "<b>".$langs->trans("RequestedUrl").":</b> ".dol_htmlentities($_SERVER["REQUEST_URI"], ENT_COMPAT, 'UTF-8')."<br>\n";
$out .= "<b>".$langs->trans("Referer").":</b> ".(isset($_SERVER["HTTP_REFERER"]) ?dol_htmlentities($_SERVER["HTTP_REFERER"], ENT_COMPAT, 'UTF-8') : '')."<br>\n";