Handle usernames that are empty Strings.
This commit is contained in:
parent
ab6df6cfce
commit
1b660d4d5b
|
@ -226,8 +226,9 @@ public class DaoAuthenticationProvider implements AuthenticationProvider,
|
||||||
if (this.context != null) {
|
if (this.context != null) {
|
||||||
context.publishEvent(new AuthenticationFailureUsernameNotFoundEvent(
|
context.publishEvent(new AuthenticationFailureUsernameNotFoundEvent(
|
||||||
authentication,
|
authentication,
|
||||||
new User(username, "*****", false,
|
new User("".equals(username)
|
||||||
new GrantedAuthority[0])));
|
? "EMPTY_STRING_PROVIDED" : username, "*****",
|
||||||
|
false, new GrantedAuthority[0])));
|
||||||
}
|
}
|
||||||
|
|
||||||
throw ex;
|
throw ex;
|
||||||
|
|
Loading…
Reference in New Issue