mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-09 23:14:51 +02:00
Fixed LDAP connection when name containt space and data login is false
(cherry picked from commit fd7fc4eb00a085b4b252d6f1b89656671d68fa58)
This commit is contained in:
parent
415a4f4373
commit
e19c002470
@ -513,10 +513,13 @@ function ldap_process_user_login ($login, $password) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ldap_login_attr = isset($config["ldap_login_attr"]) ? io_safe_output($config["ldap_login_attr"]) . "=" : '';
|
||||||
|
$ldap_base_dn = isset($config["ldap_base_dn"]) ? "," . io_safe_output($config["ldap_base_dn"]) : '';
|
||||||
|
|
||||||
if (strlen($password) == 0 ||
|
if (strlen($password) == 0 ||
|
||||||
!@ldap_bind($ds,
|
!@ldap_bind($ds,
|
||||||
io_safe_output($config["ldap_login_attr"]) . "=" . $login . "," . io_safe_output($config["ldap_base_dn"]),
|
$ldap_login_attr. io_safe_output($login) . $ldap_base_dn,
|
||||||
$password)) {
|
$password)) {
|
||||||
|
|
||||||
$config["auth_error"] = 'User not found in database or incorrect password';
|
$config["auth_error"] = 'User not found in database or incorrect password';
|
||||||
@ldap_close ($ds);
|
@ldap_close ($ds);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user