Skip to content
Snippets Groups Projects
Commit 4976f2e0 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

LDAP: append port when URL is passed in LDAP Host configuration, fixes #2600

parent bc50d928
No related branches found
No related tags found
No related merge requests found
......@@ -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)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment