Merge pull request #3256 from Icinga/bugfix/multi-domain-support-broken-3232

Make multi-domain authn working w/ upper-case domains in user names
This commit is contained in:
lippserd 2018-01-17 11:57:48 +01:00 committed by GitHub
commit ddfafb27f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -387,7 +387,7 @@ class LdapUserBackend extends LdapRepository implements UserBackendInterface, Do
public function authenticate(User $user, $password)
{
if ($this->domain !== null) {
if (! $user->hasDomain() || strtolower($user->getDomain()) !== $this->domain) {
if (! $user->hasDomain() || strtolower($user->getDomain()) !== strtolower($this->domain)) {
return false;
}

View File

@ -683,7 +683,7 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt
$domain = $this->getDomain();
if ($domain !== null) {
if (! $user->hasDomain() || strtolower($user->getDomain()) !== $domain) {
if (! $user->hasDomain() || strtolower($user->getDomain()) !== strtolower($domain)) {
return array();
}