diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 64edbd3a6f5..92a1b68b298 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -337,7 +337,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt( if ((GETPOSTISSET('massaction') || $tmpaction) && getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 3) { // All GET actions (except the listed exceptions that are usually post for pre-actions and not real action) and mass actions are processed as sensitive. // We exclude some action that are not sensitive so legitimate - if (GETPOSTISSET('massaction') || (strpos($tmpaction, 'display') !== 0 && !in_array($tmpaction, array('create', 'create2', 'createsite', 'createcard', 'edit', 'editcontract', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage', 'preview', 'reconcile', 'specimen')))) { + if (GETPOSTISSET('massaction') || (strpos($tmpaction, 'display') !== 0 && !in_array($tmpaction, array('create', 'create2', 'createsite', 'createcard', 'edit', 'editcontract', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage', 'preview', 'reconcile', 'specimen', 'validatenewpassword')))) { $sensitiveget = true; } } elseif (getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 2) { diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index e836f5f3e2b..7543606709e 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -26,7 +26,7 @@ */ define("NOLOGIN", 1); // This means this output page does not require to be logged. -define("NOCSRFCHECK", 1); + // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';