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.