When using LDAPS, check if the Host field has hostnames with ports and use the value from Port field if not.
This commit is contained in:
parent
9b1f49413d
commit
12ee9580a9
|
@ -1185,6 +1185,9 @@ class LdapConnection implements Selectable, Inspectable
|
|||
$ldapUrls = explode(' ', $hostname);
|
||||
if (count($ldapUrls) > 1) {
|
||||
foreach ($ldapUrls as & $uri) {
|
||||
if (preg_match('/:\d+$/', $uri) === 0) {
|
||||
$uri = $uri . ':' . $this->port;
|
||||
}
|
||||
if (strpos($uri, '://') === false) {
|
||||
$uri = 'ldaps://' . $uri;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue