[Pkg-owncloud-commits] [owncloud] 04/104: LDAP: fix TLS detection
David Prévot
taffit at moszumanska.debian.org
Sat Jan 18 13:33:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit d343c66f85430db837cf423e21f7bdce321e2bb6
Author: Arthur Schiwon <blizzz at owncloud.com>
Date: Fri Dec 13 17:52:19 2013 +0100
LDAP: fix TLS detection
---
apps/user_ldap/lib/wizard.php | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php
index 348a871..9de203b 100644
--- a/apps/user_ldap/lib/wizard.php
+++ b/apps/user_ldap/lib/wizard.php
@@ -795,7 +795,10 @@ class Wizard extends LDAPUtility {
$a = $this->ldap->setOption($cr, LDAP_OPT_PROTOCOL_VERSION, 3);
$c = $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 succesfull with Port '. $port . ' TLS ' . intval($tls), \OCP\Util::DEBUG);
return true;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list