You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Base64 encoding option to DefaultCookieSerializer #611
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
@rwinch I've created the PR (#614) to address this using the guidelines you outlined above.
However I wonder if this should be the default, rather than an option, considering it does not seem likely the Tomcat will change the default behavior?
Activity
vpavic commentedon Sep 2, 2016
@rwinch Will take a look into this one and come up with PR.
vpavic commentedon Sep 5, 2016
@rwinch I've created the PR (#614) to address this using the guidelines you outlined above.
However I wonder if this should be the default, rather than an option, considering it does not seem likely the Tomcat will change the default behavior?
rwinch commentedon Sep 6, 2016
@vpavic Thanks. I don't think we can make this the default:
Add `DefaultCookieSerializer` Base64 Support
Polish Base64 DefaultCookieSerializer Support
Polish Base64 DefaultCookieSerializer Support
Add `DefaultCookieSerializer` Base64 Support