-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefaultSaml2AuthenticatedPrincipal should define a serialVersionUID #16163
Comments
Hi, We had this issue when upgrading to Spring Boot 3.4.0 . When a user had a session prior upgrade; it will throw following stack trace after upgrade:
The user sesion was corrupted. We had to remove all sessions from database. Maybe I can make a contribution setting serialVersionUID to -7601324133433139825 (new serialVersionUID ) so this will not happen in future upgrades? Tx, |
Describe the bug
As a
Serializable
class,DefaultSaml2AuthenticatedPrincipal
should defineserialVersionUID
to avoid unnecessarily breaking compatibility across versions.To Reproduce
Serialise a
DefaultSaml2AuthenticatedPrincipal
using Spring Security 6.3.5 and then deserialzie using 6.4.1.Expected behavior
The field layout of the classes has not changed so they should be compatible, but the methods have (
equals
andhashCode
were added), which changes the auto-generatedserialVersionUID
.The text was updated successfully, but these errors were encountered: