fix(core): don't bind a DN to LDAP sources with a different search base

snyk-upgrade-0ec09bc7ae34af7c5d0348d49696b8f1
Francis Lachapelle 2021-05-05 09:48:17 -04:00
parent ac2853cfcf
commit e0b6e22fa2
1 changed files with 1 additions and 1 deletions

View File

@ -586,7 +586,7 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
_IDField, [_login escapedForLDAPDN], _baseDN]; _IDField, [_login escapedForLDAPDN], _baseDN];
} }
if (userDN) if (userDN && [[userDN lowercaseString] hasSuffix: [_baseDN lowercaseString]])
{ {
if (!_passwordPolicy) if (!_passwordPolicy)
didBind = [bindConnection bindWithMethod: @"simple" didBind = [bindConnection bindWithMethod: @"simple"