diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-01-15 13:02:15 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-01-15 13:02:15 +0100 |
commit | 729210daa0a7219966dff7eadedb49f5006fccb0 (patch) | |
tree | 0525bcd21ea4b4cfaed0ac13a58b401b73b3c87a /apps/user_ldap/lib | |
parent | 5d456c7cc21f7640435c4638932984a52b4cdbac (diff) | |
parent | d1f3f121d6992be07c3600882449ce17d56f116f (diff) | |
download | nextcloud-server-729210daa0a7219966dff7eadedb49f5006fccb0.tar.gz nextcloud-server-729210daa0a7219966dff7eadedb49f5006fccb0.zip |
Merge branch 'master' into memcache-public
Conflicts:
apps/user_ldap/lib/connection.php
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r-- | apps/user_ldap/lib/connection.php | 3 | ||||
-rw-r--r-- | apps/user_ldap/lib/wizard.php | 11 |
2 files changed, 9 insertions, 5 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 92168a09ffa..7fbabda7106 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -50,7 +50,8 @@ class Connection extends LDAPUtility { parent::__construct($ldap); $this->configPrefix = $configPrefix; $this->configID = $configID; - $this->configuration = new Configuration($configPrefix); + $this->configuration = new Configuration($configPrefix, + !is_null($configID)); $memcache = \OC::$server->getMemCacheFactory(); if($memcache->isAvailable()) { $this->cache = $memcache->create(); diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php index 348a871e2b3..b70ede8599c 100644 --- a/apps/user_ldap/lib/wizard.php +++ b/apps/user_ldap/lib/wizard.php @@ -792,10 +792,13 @@ class Wizard extends LDAPUtility { \OCP\Util::writeLog('user_ldap', 'Wiz: Setting LDAP Options ', \OCP\Util::DEBUG); //set LDAP options - $a = $this->ldap->setOption($cr, LDAP_OPT_PROTOCOL_VERSION, 3); - $c = $this->ldap->setOption($cr, LDAP_OPT_NETWORK_TIMEOUT, self::LDAP_NW_TIMEOUT); + $this->ldap->setOption($cr, LDAP_OPT_PROTOCOL_VERSION, 3); + $this->ldap->setOption($cr, LDAP_OPT_NETWORK_TIMEOUT, self::LDAP_NW_TIMEOUT); if($tls) { - $this->ldap->startTls($cr); + $isTlsWorking = @$this->ldap->startTls($cr); + if(!$isTlsWorking) { + return false; + } } \OCP\Util::writeLog('user_ldap', 'Wiz: Attemping to Bind ', \OCP\Util::DEBUG); @@ -809,7 +812,7 @@ class Wizard extends LDAPUtility { if($ncc) { throw new \Exception('Certificate cannot be validated.'); } - \OCP\Util::writeLog('user_ldap', 'Wiz: Bind succesfull with Port '. $port, \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'Wiz: Bind successfull to Port '. $port . ' TLS ' . intval($tls), \OCP\Util::DEBUG); return true; } |