-
Notifications
You must be signed in to change notification settings - Fork 330
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
Fix resetting of PasswordResetTokenEmailsSent Value after Expiring #7438
base: 2.5
Are you sure you want to change the base?
Fix resetting of PasswordResetTokenEmailsSent Value after Expiring #7438
Conversation
Thx for the pull request. There should be a test case added which uses a expired token with a count limit to check if it get correctly reseted. Also as a bugfix this merge request should target the git rebase -i origin/2.6 --onto origin/2.5
git push yourremote yourbranch --force if origin is your fork you can rebase to sulu 2.5 via: git remote add sulu git@github.com:sulu/sulu.git
git fetch sulu
git rebase -i sulu/2.6 --onto sulu/2.5
git push yourremote yourbranch --force And then change the target branch here. |
e035f8f
to
ca6800d
Compare
446c168
to
dd5aa98
Compare
dd5aa98
to
aa1614a
Compare
Let us know if you need any help here or have questions. |
Yeah please, I don't really understand why the tests never work. Am I missing something? |
Swiftmailer is only used on lowest versions newer version using the Symfony Mailer so you need bridge that inside the test. Normally the LegacyResettingControllerTest runs for swiftmailer I think and the other for Symfony Mailer which has its own collector.
Is mostly an issue of test fixtures vs test client data. Try to clear the entityManager after you created the fixtures before doing the client request. |
…com:TimonStadelmann/sulu into bugfix/password-reset-token-expiresat-check
What's in this PR?
Fix check of
passwordResetTokenExpiresAt
by moving it to the calling function and dividing it into two checks. So that if the token is expired thepasswordResetTokenEmailsSent
is reset to 0. Otherwise it's going to be checked whether themaxNumberEmails
was reached or not, and acted upon that accordingly.Why?
"Reset password does not work properly.
If someone makes a reset password request, request works and "passwordResetTokenEmailsSent" goes up to 3.
Even 48h after, passwordResetTokenEmailsSent stays at 3, so reset emails are not sent.
BUT, this number is never reset to 0, even if time interval (24h) is done."
To Do