diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-10-21 04:00:24 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-01-26 14:53:32 +0100 |
commit | b8fbd7721d25f9863d452db91fb3823108641dfa (patch) | |
tree | 23861512598403287b3c152d1210db9ad56d175a | |
parent | a630ee8dceb306f2b491bbc5f92d3cf2f28c641d (diff) | |
download | nextcloud-server-b8fbd7721d25f9863d452db91fb3823108641dfa.tar.gz nextcloud-server-b8fbd7721d25f9863d452db91fb3823108641dfa.zip |
fix(user_ldap): Ensure host is a string when checking if `ldapi`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r-- | apps/user_ldap/lib/Configuration.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index 43d7b5cfbf1..b009ba3f480 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -607,6 +607,7 @@ class Configuration { * Returns TRUE if the ldapHost variable starts with 'ldapi://' */ public function usesLdapi(): bool { - return (substr($this->config['ldapHost'], 0, strlen('ldapi://')) === 'ldapi://'); + $host = $this->config['ldapHost']; + return is_string($host) && (substr($host, 0, strlen('ldapi://')) === 'ldapi://'); } } |