Merge pull request #25901 from nextcloud/backport/25860/stable19
[stable19] do not die after LDAP auth failed with expired acc
This commit is contained in:
commit
4a111afc8d
|
@ -671,9 +671,12 @@ class Connection extends LDAPUtility {
|
|||
'Bind failed: ' . $errno . ': ' . $this->ldap->error($cr),
|
||||
ILogger::WARN);
|
||||
|
||||
// Set to failure mode, if LDAP error code is not LDAP_SUCCESS or LDAP_INVALID_CREDENTIALS
|
||||
// or (needed for Apple Open Directory:) LDAP_INSUFFICIENT_ACCESS
|
||||
if ($errno !== 0 && $errno !== 49 && $errno !== 50) {
|
||||
// Set to failure mode, if LDAP error code is not one of
|
||||
// - LDAP_SUCCESS (0)
|
||||
// - LDAP_INVALID_CREDENTIALS (49)
|
||||
// - LDAP_INSUFFICIENT_ACCESS (50, spotted Apple Open Directory)
|
||||
// - LDAP_UNWILLING_TO_PERFORM (53, spotted eDirectory)
|
||||
if (!in_array($errno, [0, 49, 50, 53], true)) {
|
||||
$this->ldapConnectionRes = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue