wizard should also detect protocol errors, as side effect enforces LDAPv3

This commit is contained in:
Arthur Schiwon 2015-12-05 00:43:38 +01:00
parent a32b002cff
commit 86fcb08745
1 changed files with 3 additions and 0 deletions

View File

@ -570,6 +570,7 @@ class Connection extends LDAPUtility {
* @param string $host * @param string $host
* @param string $port * @param string $port
* @return false|void * @return false|void
* @throws \OC\ServerNotAvailableException
*/ */
private function doConnect($host, $port) { private function doConnect($host, $port) {
if(empty($host)) { if(empty($host)) {
@ -582,6 +583,8 @@ class Connection extends LDAPUtility {
$this->ldap->startTls($this->ldapConnectionRes); $this->ldap->startTls($this->ldapConnectionRes);
} }
} }
} else {
throw new \OC\ServerNotAvailableException('Could not set required LDAP Protocol version.');
} }
} }