summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-05-07 21:09:10 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-05-18 18:14:05 +0200
commitb9e53097577499b519f9fcdd053421cb1507bab3 (patch)
tree993d979ffb581936309934c2a2d068f61c1ebdb2 /apps/user_ldap/lib
parentb085f5855362bb8c305083c1d60ebfd459323a96 (diff)
downloadnextcloud-server-b9e53097577499b519f9fcdd053421cb1507bab3.tar.gz
nextcloud-server-b9e53097577499b519f9fcdd053421cb1507bab3.zip
catch unallowed anonymous auth attempt and show specific error
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/ldap.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/ldap.php b/apps/user_ldap/lib/ldap.php
index 74df3dd8ae7..48852a3a491 100644
--- a/apps/user_ldap/lib/ldap.php
+++ b/apps/user_ldap/lib/ldap.php
@@ -287,6 +287,8 @@ class LDAP implements ILDAPWrapper {
//referrals, we switch them off, but then there is AD :)
} else if ($errorCode === -1) {
throw new ServerNotAvailableException('Lost connection to LDAP server.');
+ } else if ($errorCode === 48) {
+ throw new \Exception('LDAP authentication method rejected');
} else {
\OCP\Util::writeLog('user_ldap',
'LDAP error '.$errorMsg.' (' .