mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-03-02 19:39:13 +00:00
SEC-478: Handle incorrect Base64 cookie encoding.
This commit is contained in:
parent
5b8898c750
commit
f45c0944ef
@ -118,6 +118,10 @@ public class TokenBasedRememberMeServices implements RememberMeServices, Initial
|
||||
if (ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE_KEY.equals(cookies[i].getName())) {
|
||||
String cookieValue = cookies[i].getValue();
|
||||
|
||||
for (int j = 0; j < cookieValue.length() % 4; j++) {
|
||||
cookieValue = cookieValue + "=";
|
||||
}
|
||||
|
||||
if (Base64.isArrayByteBase64(cookieValue.getBytes())) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Remember-me cookie detected");
|
||||
|
Loading…
x
Reference in New Issue
Block a user