From 86fcb0874582d48c0a0460579c6e8c94bb773645 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Sat, 5 Dec 2015 00:43:38 +0100 Subject: [PATCH] wizard should also detect protocol errors, as side effect enforces LDAPv3 --- apps/user_ldap/lib/connection.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 57dc060f38..67918bca40 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -570,6 +570,7 @@ class Connection extends LDAPUtility { * @param string $host * @param string $port * @return false|void + * @throws \OC\ServerNotAvailableException */ private function doConnect($host, $port) { if(empty($host)) { @@ -582,6 +583,8 @@ class Connection extends LDAPUtility { $this->ldap->startTls($this->ldapConnectionRes); } } + } else { + throw new \OC\ServerNotAvailableException('Could not set required LDAP Protocol version.'); } }