mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-09 11:53:30 +00:00
SEC-1223: Added break to bindWithDnLoop when non-null use is returned.
This commit is contained in:
parent
2f9a98c7ce
commit
d47abbc35f
@ -80,6 +80,10 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
|
|||||||
// If DN patterns are configured, try authenticating with them directly
|
// If DN patterns are configured, try authenticating with them directly
|
||||||
for (String dn : getUserDns(username)) {
|
for (String dn : getUserDns(username)) {
|
||||||
user = bindWithDn(dn, username, password);
|
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.
|
// Otherwise use the configured search object to find the user and authenticate with the returned DN.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user