Fix LDAP authentication for the RFC2307 server type
The accountWithMemberOfQuery is only set for the active directory server type. We must not use this query for authenticating against an RFC2307 server type as it is null in this case and no account is found. Honor the fetchMemberOf parameter of the Helper.findAccount only when the accountMemberField is supported for the given LDAP type. Bug: Issue 3201 Change-Id: Ifa58dcf6588b6bcae7c46d1cf793aaecb107aff2
This commit is contained in:
@@ -194,7 +194,7 @@ import javax.security.auth.login.LoginException;
|
||||
params.put(LdapRealm.USERNAME, username);
|
||||
|
||||
List<LdapQuery> accountQueryList;
|
||||
if (fetchMemberOf) {
|
||||
if (fetchMemberOf && schema.type.accountMemberField() != null) {
|
||||
accountQueryList = schema.accountWithMemberOfQueryList;
|
||||
} else {
|
||||
accountQueryList = schema.accountQueryList;
|
||||
|
Reference in New Issue
Block a user