Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblizzz <blizzz@owncloud.com>2013-06-04 12:31:52 +0400
committerblizzz <blizzz@owncloud.com>2013-06-04 12:31:52 +0400
commit68960db77e8329aba274707cc7b7633030d11fb4 (patch)
treeff5b55ffaf75732027102f6889f1d7e0a6dd01c1
parent9046c65af57f9e90d28621a1176d2c2334bdd5df (diff)
parent03e598202685a2512fafc7664099c24eb51e4dac (diff)
Merge pull request #3584 from owncloud/fix_ldap_port
LDAP: append port when URL is passed in LDAP Host configuration, fixes #...
-rw-r--r--apps/user_ldap/lib/connection.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index a2a4776de6f..46bbbb17a46 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -621,6 +621,10 @@ class Connection {
if(empty($host)) {
return false;
}
+ if(strpos($host, '://') !== false) {
+ //ldap_connect ignores port paramater when URLs are passed
+ $host .= ':' . $port;
+ }
$this->ldapConnectionRes = ldap_connect($host, $port);
if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_PROTOCOL_VERSION, 3)) {
if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_REFERRALS, 0)) {