Skip to content

Commit a7193ce

Browse files
authored
Merge pull request #17595 from nextcloud/fix/noid/wrong-pwd-apple-open-dir
treat LDAP error 50 as auth issue, prevents lost server connection errors
2 parents 75ecae2 + 38a8306 commit a7193ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/user_ldap/lib/Connection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,8 @@ public function bind() {
675675
ILogger::WARN);
676676

677677
// Set to failure mode, if LDAP error code is not LDAP_SUCCESS or LDAP_INVALID_CREDENTIALS
678-
if($errno !== 0x00 && $errno !== 0x31) {
678+
// or (needed for Apple Open Directory:) LDAP_INSUFFICIENT_ACCESS
679+
if($errno !== 0 && $errno !== 49 && $errno !== 50) {
679680
$this->ldapConnectionRes = null;
680681
}
681682

0 commit comments

Comments
 (0)