diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-05-08 17:15:29 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-05-18 18:14:05 +0200 |
commit | 5a563936579110bfa7d333ae8f32121cbc36cc7d (patch) | |
tree | 0d9b5c31e449fd8fcee9502583f2dda4ccb8c28a /apps/user_ldap/lib/ldap.php | |
parent | b9e53097577499b519f9fcdd053421cb1507bab3 (diff) | |
download | nextcloud-server-5a563936579110bfa7d333ae8f32121cbc36cc7d.tar.gz nextcloud-server-5a563936579110bfa7d333ae8f32121cbc36cc7d.zip |
throw exception on LDAP error 1, which we usually do not see and is pretty generic. AD uses is for uses not enlisted in the RFC, like on issues with anonymous binds. we also try to guess this case and show a hint.
Diffstat (limited to 'apps/user_ldap/lib/ldap.php')
-rw-r--r-- | apps/user_ldap/lib/ldap.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/ldap.php b/apps/user_ldap/lib/ldap.php index 48852a3a491..8d2c493a4dc 100644 --- a/apps/user_ldap/lib/ldap.php +++ b/apps/user_ldap/lib/ldap.php @@ -289,6 +289,8 @@ class LDAP implements ILDAPWrapper { throw new ServerNotAvailableException('Lost connection to LDAP server.'); } else if ($errorCode === 48) { throw new \Exception('LDAP authentication method rejected'); + } else if ($errorCode === 1) { + throw new \Exception('LDAP Operations error', $errorCode); } else { \OCP\Util::writeLog('user_ldap', 'LDAP error '.$errorMsg.' (' . |