-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[*] Rework session destroy into customer session clean #39128
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
base: 2.4-develop
Are you sure you want to change the base?
Conversation
Hi @sfritzsche. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
37cbd05
to
ef2620b
Compare
Hi @sfritzsche, for a client of ours we are looking at exactly the same issue. I have been looking at the PR and I'm not sure if the clearFor call is really needed? When only removing the $this->session->destroy line everything seems to be working in correct order. So I'm wondering in what scenario the other part of this PR is needed? The clearFor call also causes a possible place for misbehaviour since this controller could get used to spam a lot of update calls to the database or be used to clear sessions for other accounts. |
Hi @igorwulff, this issue/pull-request was one of many that day. Unfortunately, I didn't have time to familiarize myself with the exact processes. However, I had seen in the history of the file that the last commit concerned exactly this line: The title of the commit “Reset password issue using a different browser to login” made me assume that there was an important reason to include the line. (@abukatar) A second reason for the conversion to “clearFor” was an older ticket on the same topic: There, the same line was converted in the same way. In theory, I would agree with you that there should theoretically be no need to reset anything in the user's session for the “Reset password” process. But it really wasn't within my time frame to check the details. |
@magento run all tests |
ef2620b
to
3936ba6
Compare
@magento run all tests |
3936ba6
to
051fac6
Compare
Description (*)
Before:
The current session (incl. cart items) making a password “forget” request is destroyed as soon as a password request with a formally correct email address is received.
After:
The process is only triggered if the email address really exists.
If it does, only the customer session associated with the email address is reset and not the session that “requested” it.
Fixed Issues
Manual testing scenarios (*)