-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Prevent Save @Transient Authentication with existing HttpSession #9993
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, @rwinch. I left a polish suggestion inline.
...main/java/org/springframework/security/web/context/HttpSessionSecurityContextRepository.java
Show resolved
Hide resolved
Previously, @transient Authentication would get saved if an existing HttpSession existed but it shouldn't. This commit always prevents @transient Authentication from being saved. Closes spring-projectsgh-9992
2c01e41
to
87f38d8
Compare
Merged via 96a6fef |
…entication Related spring-projects/spring-security#9993 Closes gh-482
This breaks my app when I switched from 5.6.6 to 5.7, as JwtAuthenticationToken which has @transient is being used:
This flow breaks because of the isTransient method now. Is there something wrong with this flow? and why should @transient Authentication be prevented from saving? Any suggestions? |
…entication Related spring-projects/spring-security#9993 Closes gh-482
…entication Related spring-projects/spring-security#9993 Closes gh-482
Previously,
@Transient Authentication
would get saved if an existingHttpSession
existed but it shouldn't.This commit always prevents
@Transient Authentication
from being saved.Closes gh-9992