diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2021-03-02 21:34:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-02 21:34:03 +0100 |
commit | ef5389603c79df944ec5d0573e6e745c22c213e3 (patch) | |
tree | 5df8398e158fece6df500ad6c981193537ebaad0 /apps/user_ldap/lib | |
parent | 85fe0222ed471ce272cb62c5e51f0a9d250a2fc2 (diff) | |
parent | 5ad08c7c844005d6fbb82be77e1d7af7c45a1166 (diff) | |
download | nextcloud-server-ef5389603c79df944ec5d0573e6e745c22c213e3.tar.gz nextcloud-server-ef5389603c79df944ec5d0573e6e745c22c213e3.zip |
Merge pull request #25860 from nextcloud/fix/noid/ldap-bind-expired
do not die after LDAP auth failed with expired acc
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r-- | apps/user_ldap/lib/Connection.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 9a99b94689f..6ba21c6de2c 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -676,9 +676,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; } |