You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our project we had issues with wrong password reset requests. We were able to track this down to a rounding issue with the expiresAt field for the ResetPasswordRequest.
Setup:
Symfony 6.2.6
PHP 8.1.13
Doctrine MySQL
For the hashed token, the unix timestamp of the expiresAt is used and stored. Also expiresAt is stored as DateTimeImmutable. With Doctrine entries with milliseconds will get rounded and stored with an one second higher value in the database.
During verification based on the expiresAt value, the hashes then do not match and the user is confronted with an error.
Our solution is to strip the milliseconds while creating a ResetPasswordRequest:
In our project we had issues with wrong password reset requests. We were able to track this down to a rounding issue with the expiresAt field for the ResetPasswordRequest.
Setup:
Symfony 6.2.6
PHP 8.1.13
Doctrine MySQL
For the hashed token, the unix timestamp of the expiresAt is used and stored. Also expiresAt is stored as DateTimeImmutable. With Doctrine entries with milliseconds will get rounded and stored with an one second higher value in the database.
During verification based on the expiresAt value, the hashes then do not match and the user is confronted with an error.
Our solution is to strip the milliseconds while creating a ResetPasswordRequest:
This could be added to the maker script.
The text was updated successfully, but these errors were encountered: