-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
improve customer and employee password reset token's randomness #31725
base: develop
Are you sure you want to change the base?
improve customer and employee password reset token's randomness #31725
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.
Be extremely careful with this change. Customer's secure_key
is validated against cart secure_key
and order secure_key
on many places. Make sure not to fuck up people's carts and orders after upgrading. 👍
I'm launching the full automatic test suite so that such problem would be detected https://github.com/matthieu-rolland/ga.tests.ui.pr/actions/runs/4385534307 |
@matthieu-rolland I am checking it right now and it should be safe. It always assigns the secure key of the customer and the customer is the first object created. And this will affect only new customers. |
actually this simple PR breaks a lot of things :D https://github.com/matthieu-rolland/ga.tests.ui.pr/actions/runs/4385534307/jobs/7678382320 |
@matthieu-rolland yep, in |
yep, I'll look further into it 👍 (in a meeting right now) Edit: So, I need to add a new validation method for these tokens, and to increase the size of the |
mt_rand()
which is not cryptographically secure