More log to help debug

This commit is contained in:
Laurent Destailleur 2019-03-04 20:15:31 +01:00
parent acaf5cabef
commit 54b9681257

View File

@ -80,7 +80,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest=
if (! empty($conf->global->DATABASE_PWD_ENCRYPTED)) $cryptType=$conf->global->DATABASE_PWD_ENCRYPTED;
// By default, we used MD5
if (! in_array($cryptType,array('md5'))) $cryptType='md5';
if (! in_array($cryptType, array('md5'))) $cryptType='md5';
// Check crypted password according to crypt algorithm
if ($cryptType == 'md5')
{
@ -109,8 +109,9 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest=
}
else
{
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko bad password for '".$usertotest."'");
sleep(2); // Anti brut force protection
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko bad password for '".$usertotest."', cryptType=".$cryptType);
//dol_syslog("passclear=".$passclear." passtyped=".$passtyped." passcrypted=".$passcrypted);
sleep(2); // Anti brut force protection
$langs->load('main');
$langs->load('errors');
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadLoginPassword");