From cfeb0dccfebca0a9b02185594ff5363e4f4ac71d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Mar 2018 19:29:22 +0100 Subject: [PATCH] Better support for MAIN_AUTHENTICATION_POST_METHOD --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c9c6c2d4cde..115155e629a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -502,7 +502,7 @@ if (! defined('NOLOGIN')) $allowedmethodtopostusername = 2; if (defined('MAIN_AUTHENTICATION_POST_METHOD')) $allowedmethodtopostusername = constant('MAIN_AUTHENTICATION_POST_METHOD'); $usertotest = (! empty($_COOKIE['login_dolibarr']) ? $_COOKIE['login_dolibarr'] : GETPOST("username","alpha",$allowedmethodtopostusername)); - $passwordtotest = GETPOST('password','none',2); + $passwordtotest = GETPOST('password','none',$allowedmethodtopostusername); $entitytotest = (GETPOST('entity','int') ? GETPOST('entity','int') : (!empty($conf->entity) ? $conf->entity : 1)); // Define if we received data to test the login.