Skip to content

Commit

Permalink
fix(user_ldap): Ensure host is a string when checking if ldapi
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Oct 21, 2023
1 parent 2bbe973 commit 4e24fd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/user_ldap/lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ public function getAvatarAttributes(): array {
* 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://');
}
}

0 comments on commit 4e24fd1

Please sign in to comment.