diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-10-25 09:59:56 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-10-25 09:59:56 +0200 |
commit | 5242a78994d85547168db3413df47f93ce182596 (patch) | |
tree | 7e8cf40ca91b899ce0de2f630cdd9f08ef4d8cd8 /apps/user_ldap | |
parent | 3dedfd34b92f22835dbe9e466c3776861fd613ab (diff) | |
download | nextcloud-server-5242a78994d85547168db3413df47f93ce182596.tar.gz nextcloud-server-5242a78994d85547168db3413df47f93ce182596.zip |
Fix $host var handling to avoid passing null to ldap_connect
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Wizard.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 346ac7a61a6..2ecdce610a7 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -1049,8 +1049,8 @@ class Wizard extends LDAPUtility { private function connectAndBind(int $port, bool $tls): bool { //connect, does not really trigger any server communication $host = $this->configuration->ldapHost; - $hostInfo = parse_url($host); - if (!$hostInfo) { + $hostInfo = parse_url((string)$host); + if (!is_string($host) || !$hostInfo) { throw new \Exception(self::$l->t('Invalid Host')); } $this->logger->debug( |