소스 검색

fix(user_ldap): Ensure host is a string when checking if `ldapi`

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
tags/v29.0.0beta1
Ferdinand Thiessen 8 달 전
부모
커밋
b8fbd7721d
No account linked to committer's email address
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      apps/user_ldap/lib/Configuration.php

+ 2
- 1
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://');
}
}

Loading…
취소
저장