Merge pull request #17617 from nextcloud/backport/17595/stable17

[stable17] treat LDAP error 50 as auth issue, prevents lost server connection errors
This commit is contained in:
Roeland Jago Douma 2019-10-22 16:09:11 +02:00 committed by GitHub
commit 3dfcad949e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -675,7 +675,8 @@ class Connection extends LDAPUtility {
ILogger::WARN);
// Set to failure mode, if LDAP error code is not LDAP_SUCCESS or LDAP_INVALID_CREDENTIALS
if($errno !== 0x00 && $errno !== 0x31) {
// or (needed for Apple Open Directory:) LDAP_INSUFFICIENT_ACCESS
if($errno !== 0 && $errno !== 49 && $errno !== 50) {
$this->ldapConnectionRes = null;
}