From: Arthur Schiwon Date: Wed, 6 Feb 2013 13:30:17 +0000 (+0100) Subject: LDAP: when ldaps and tls are configured, disable the latter one - they do not work... X-Git-Tag: v5.0.0alpha1~86^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e122fdbcb63cc4e36982dc23bd2a38c904417447;p=nextcloud-server.git LDAP: when ldaps and tls are configured, disable the latter one - they do not work together. ldaps already creates a secure connection. --- diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index acc33e047c6..38b2b131e50 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -409,6 +409,11 @@ class Connection { $this->config[$key] = array(); } } + if((strpos($this->config['ldapHost'], 'ldaps') === 0) + && $this->config['ldapTLS']) { + $this->config['ldapTLS'] = false; + \OCP\Util::writeLog('user_ldap', 'LDAPS (already using secure connection) and TLS do not work together. Switched of TLS.', \OCP\Util::INFO); + }