aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2021-03-01 19:20:05 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2021-03-01 19:20:05 +0100
commit5ad08c7c844005d6fbb82be77e1d7af7c45a1166 (patch)
tree46fde0e32fb1dc9a56386770972d7e3eb7cb4662 /apps
parent18b419f0ca7973f9797d239a644c2f05422a858c (diff)
downloadnextcloud-server-5ad08c7c844005d6fbb82be77e1d7af7c45a1166.tar.gz
nextcloud-server-5ad08c7c844005d6fbb82be77e1d7af7c45a1166.zip
do not die after LDAP auth failed with expired acc
- some servers return error code 53 Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/Connection.php9
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;
}