summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-06-03 23:07:32 +0200
committerArthur Schiwon <blizzz@owncloud.com>2013-06-04 10:32:54 +0200
commit4976f2e0d363e980a90745bb2e2cb93d5dd2f5cb (patch)
tree170257440e020e62116a21130fb387124871dfd2 /apps/user_ldap
parentbc50d9284103ba765f8a5f8befa1b408a1847bb3 (diff)
downloadnextcloud-server-4976f2e0d363e980a90745bb2e2cb93d5dd2f5cb.tar.gz
nextcloud-server-4976f2e0d363e980a90745bb2e2cb93d5dd2f5cb.zip
LDAP: append port when URL is passed in LDAP Host configuration, fixes #2600
Diffstat (limited to 'apps/user_ldap')
-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 409f3758792..31150a5bec5 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)) {