-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Security] remove the user FQCN from remember me cookies #61760
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
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
This comment was marked as outdated.
This comment was marked as outdated.
Member
|
The failure on high-deps looks legit to me: 7.4 will break when loaded with 8.0 at the moment. |
| { | ||
| // $userIdentifier is encoded because it might contain COOKIE_DELIMITER, we assume other values don't | ||
| return implode(self::COOKIE_DELIMITER, [strtr($this->userFqcn ?? '', '\\', '.'), strtr(base64_encode($this->userIdentifier), '+/=', '-_~'), $this->expires, $this->value]); | ||
| return implode(self::COOKIE_DELIMITER, [strtr(base64_encode($this->userIdentifier), '+/=', '-_~'), $this->expires, $this->value]); |
Member
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.
I this we should preserve the current layout for easier BC/FC
Suggested change
| return implode(self::COOKIE_DELIMITER, [strtr(base64_encode($this->userIdentifier), '+/=', '-_~'), $this->expires, $this->value]); | |
| return implode(self::COOKIE_DELIMITER, ['', strtr(base64_encode($this->userIdentifier), '+/=', '-_~'), $this->expires, $this->value]); |
nicolas-grekas
added a commit
that referenced
this pull request
Sep 18, 2025
…okie to ease upgrades (xabbuh) This PR was merged into the 7.4 branch. Discussion ---------- [Security] keep an empty class segment in remember me cookie to ease upgrades | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | see #61760 (comment) | License | MIT Commits ------- 8d97784 keep an empty class segment in remember me cookie to ease upgrades
abdellahrk
pushed a commit
to abdellahrk/symfony
that referenced
this pull request
Sep 18, 2025
…r me cookie to ease upgrades (xabbuh) This PR was merged into the 7.4 branch. Discussion ---------- [Security] keep an empty class segment in remember me cookie to ease upgrades | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | see symfony#61760 (comment) | License | MIT Commits ------- 8d97784 keep an empty class segment in remember me cookie to ease upgrades
bb13758 to
364c1e5
Compare
xabbuh
added a commit
that referenced
this pull request
Sep 19, 2025
This PR was merged into the 7.4 branch. Discussion ---------- [Security] make test forward compatible | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT see the high deps failure in #61760 Commits ------- e978c2e make test forward compatible
Member
Author
|
tests are fixed Status: Needs Review |
nicolas-grekas
approved these changes
Sep 19, 2025
fabpot
approved these changes
Sep 19, 2025
Member
|
Thank you @xabbuh. |
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.
Uh oh!
There was an error while loading. Please reload this page.