-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Login check fails #36989
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
Comments
I think this is the most important log line. I think it somehow is related to #35944 Do you by any chance customize user roles in your application without saving it? Or can you maybe try to debug |
This has been reproduced in symfony/demo#1121, I'll take a look tonight |
I think this happens when the serialization of the User class does not include roles. |
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- [Security] Fixed AbstractToken::hasUserChanged() | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #36989 | License | MIT | Doc PR | - This PR completely reverts #35944. That PR tried to fix a BC break (ref #35941, #35509) introduced by #31177. However, this broke many authentications (ref #36989), as the User is serialized in the session (as hinted by @stof). Many applications don't include the `roles` property in the serialization (at least, the MakerBundle doesn't include it). In 5.2, we should probably deprecate having different roles in token and user, which fixes the BC breaks all together. Commits ------- f297beb [Security] Fixed AbstractToken::hasUserChanged()
Symfony version(s) affected: 5.1.0-RC2 (PHP 7.4.6)
Description
Authentication passes, but i get logged out afterwards. I'm unsure why this happens.
How to reproduce
Used/tested permissions
Downgrade to 5.1.0-RC1 resolves the issue/ works without a problem.
Additional context
The text was updated successfully, but these errors were encountered: