-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security/Http] Check tokens before loading users from providers #49078
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f00b9ed
to
ec78c9b
Compare
(deps=high failures need a merge up to be green). |
stof
reviewed
Jan 24, 2023
src/Symfony/Component/Security/Core/Signature/SignatureHasher.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/RememberMe/SignatureRememberMeHandler.php
Outdated
Show resolved
Hide resolved
ec78c9b
to
889d739
Compare
nicolas-grekas
commented
Jan 24, 2023
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.
Comments addressed @stof, thanks for the review. New round unlocked :)
stof
approved these changes
Jan 24, 2023
This was referenced Jan 24, 2023
Merged
Merged
Merged
Closed
nicolas-grekas
added a commit
that referenced
this pull request
Jan 25, 2023
…legacy tokens (nicolas-grekas) This PR was merged into the 5.4 branch. Discussion ---------- [Security/Http] Fix compat of persistent remember-me with legacy tokens | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #49100 | License | MIT | Doc PR | - In #49078, we changed the format of remember-me tokens, effectively invalidating them all. While the invalidation is intentional for signature-based remember-me handlers, persistent remember-me handlers could accept both legacy and updated tokens. This PR fixes compat with legacy tokens for persistent remember-me handlers. Commits ------- 538d660 [Security/Http] Fix compat of persistent remember-me with legacy tokens
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remember me cookies and login link handler tokens contain an expiry but we check this expiry only after we've loaded a user from a provider. This can create unneeded load on the provider. Note that the now legacy security subsystem was free from this issue so this PR is fixing a regression.
For persistent tokens, I've removed any logic to sign them in
PersistentRememberMeHandler
because we never validate the signature, so it's just useless.