SEC-474: Gracefully abort if username and password non-retrievable.
This commit is contained in:
parent
f45c0944ef
commit
a18bd9100c
|
@ -286,6 +286,11 @@ public class TokenBasedRememberMeServices implements RememberMeServices, Initial
|
||||||
password = successfulAuthentication.getCredentials().toString();
|
password = successfulAuthentication.getCredentials().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If unable to find a username and password, just abort as TokenBasedRememberMeServices unable to construct a valid token in this case
|
||||||
|
if (!StringUtils.hasLength(username) || !StringUtils.hasLength(password)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Assert.hasLength(username);
|
Assert.hasLength(username);
|
||||||
Assert.hasLength(password);
|
Assert.hasLength(password);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue