Code comment
This commit is contained in:
parent
eab8af760d
commit
5d32f0f6ac
@ -124,8 +124,8 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes
|
|||||||
if ($passok) {
|
if ($passok) {
|
||||||
$login = $obj->login;
|
$login = $obj->login;
|
||||||
} else {
|
} else {
|
||||||
sleep(1); // Anti brut force protection
|
|
||||||
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO bad password for '".$usertotest."', cryptType=".$cryptType, LOG_NOTICE);
|
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO bad password for '".$usertotest."', cryptType=".$cryptType, LOG_NOTICE);
|
||||||
|
sleep(1); // Anti brut force protection. Must be same delay when login is not valid
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
@ -153,7 +153,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO user not found for '".$usertotest."'", LOG_NOTICE);
|
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO user not found for '".$usertotest."'", LOG_NOTICE);
|
||||||
sleep(1);
|
sleep(1); // Anti brut force protection. Must be same delay when password is not valid
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
|
|||||||
@ -122,7 +122,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
print "DEBUG: User ".$usertotest." must change password<br>\n";
|
print "DEBUG: User ".$usertotest." must change password<br>\n";
|
||||||
}
|
}
|
||||||
$ldap->unbind();
|
$ldap->unbind();
|
||||||
sleep(1);
|
sleep(1); // Anti brut force protection. Must be same delay when user and password are not valid.
|
||||||
$langs->load('ldap');
|
$langs->load('ldap');
|
||||||
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("YouMustChangePassNextLogon", $usertotest, $ldap->domainFQDN);
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("YouMustChangePassNextLogon", $usertotest, $ldap->domainFQDN);
|
||||||
return '';
|
return '';
|
||||||
@ -245,7 +245,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
}
|
}
|
||||||
if ($result == 1) {
|
if ($result == 1) {
|
||||||
dol_syslog("functions_ldap::check_user_password_ldap Authentication KO bad user/password for '".$usertotest."'", LOG_NOTICE);
|
dol_syslog("functions_ldap::check_user_password_ldap Authentication KO bad user/password for '".$usertotest."'", LOG_NOTICE);
|
||||||
sleep(1);
|
sleep(1); // Anti brut force protection. Must be same delay when user and password are not valid.
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'other'));
|
$langs->loadLangs(array('main', 'other'));
|
||||||
@ -267,7 +267,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
$ldap->ldapErrorText = ldap_error($ldap->connection);
|
$ldap->ldapErrorText = ldap_error($ldap->connection);
|
||||||
dol_syslog("functions_ldap::check_user_password_ldap ".$ldap->ldapErrorCode." ".$ldap->ldapErrorText);
|
dol_syslog("functions_ldap::check_user_password_ldap ".$ldap->ldapErrorCode." ".$ldap->ldapErrorText);
|
||||||
}
|
}
|
||||||
sleep(1); // Anti brut force protection
|
sleep(1); // Anti brut force protection. Must be same delay when user and password are not valid.
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'other', 'errors'));
|
$langs->loadLangs(array('main', 'other', 'errors'));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user