mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
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);
|
$ldapUrls = explode(' ', $hostname);
|
||||||
if (count($ldapUrls) > 1) {
|
if (count($ldapUrls) > 1) {
|
||||||
foreach ($ldapUrls as & $uri) {
|
foreach ($ldapUrls as & $uri) {
|
||||||
|
if (preg_match('/:\d+$/', $uri) === 0) {
|
||||||
|
$uri = $uri . ':' . $this->port;
|
||||||
|
}
|
||||||
if (strpos($uri, '://') === false) {
|
if (strpos($uri, '://') === false) {
|
||||||
$uri = 'ldaps://' . $uri;
|
$uri = 'ldaps://' . $uri;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user