LDAP: append port when URL is passed in LDAP Host configuration, fixes #2600
This commit is contained in:
parent
bc50d92841
commit
4976f2e0d3
1 changed files with 4 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue