SEC-1223: Added break to bindWithDnLoop when non-null use is returned.

This commit is contained in:
Luke Taylor 2009-08-19 21:34:05 +00:00
parent 2f9a98c7ce
commit d47abbc35f
1 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,10 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
// If DN patterns are configured, try authenticating with them directly
for (String dn : getUserDns(username)) {
user = bindWithDn(dn, username, password);
if (user != null) {
break;
}
}
// Otherwise use the configured search object to find the user and authenticate with the returned DN.