Closed
Description
In order to support RFC 6265 we should consider adding Base64 encoding option to DefaultCookieSerializer
since the spec states:
To maximize compatibility with user agents, servers that wish to
store arbitrary data in a cookie-value SHOULD encode that data, for
example, using Base64
NOTE:
- We must remain JDK 5 compliant, so we will likely need to copy code from Spring Security into a package private class. See Base64 and Base64Tests
- We should also be safe when decoding the value. If we get an error decoding the cookie value, we should return
null
. This prevents internal server errors if a user has a cookie with a non-base64 encoded value (i.e. there was a migration). Additionally, it prevents information leakage in the event a malicious user specifies an invalid value