Merge pull request #10741 from frederic34/patch-5

Update main.inc.php
This commit is contained in:
Laurent Destailleur 2019-03-07 12:30:03 +01:00 committed by GitHub
commit a9952c5807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -395,6 +395,7 @@ if ((! defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && ! empty($conf->
{
dol_syslog("Invalid token, so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING);
//print 'Unset POST by CSRF protection in main.inc.php.'; // Do not output anything because this create problems when using the BACK button on browsers.
if ($conf->global->MAIN_FEATURES_LEVEL>1) setEventMessages('Unset POST by CSRF protection in main.inc.php.', null, 'warnings');
unset($_POST);
unset($_GET['confirm']);
}