Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Security/Http] Hash Persistent RememberMe token#35960
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Security/Http] Hash Persistent RememberMe token#35960
Uh oh!
There was an error while loading.Please reload this page.
Conversation
You need random data in the hash (nonce) to make the secret unknowable. |
SHA256 seems good enough as per#27910 (comment) |
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.
Don't miss adding some tests :)
src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...fony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
I've updated |
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.
LGTM thanks
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.
The Security CHANGELOG needs to be updated.
Thank you@guillbdx. |
Uh oh!
There was an error while loading.Please reload this page.
The purpose of this PR is to enhance the Remember Me persistent token feature: instead of storing cleared token value in DB, the values will be hashed.
To make sure that existing remember me cookies will keep being valid after this change, we prefix the new token values with 'hash_'. In case the token value doesn't match this prefix, we keep validating it the old way.