Skip to content

Commit

Permalink
Merge pull request #17618 from nextcloud/backport/17595/stable16
Browse files Browse the repository at this point in the history
[stable16] treat LDAP error 50 as auth issue, prevents lost server connection errors
  • Loading branch information
rullzer authored Oct 21, 2019
2 parents 63479ba + 8ce5346 commit a9f1ab8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/user_ldap/lib/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,8 @@ public function bind() {
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;
}

Expand Down

0 comments on commit a9f1ab8

Please sign in to comment.