#104214Broken redirect to referrer after changing password
Description
The problem has been described in #21943 already:
- You ask to reset your password, and click the link to enter new password twice
- You get a confirmation message everything is fine, you may now log in
- You do the login and get an “error message” telling you that the link you clicked is invalid and that you should repeat the reset password procedure
If you happen(ed) to click anywhere else in the website at this stage, you would see that you are actually properly authenticated but as a user you see that error message and contact your TYPO3 administrator instead.
Steps
0. Ensure your felogin plugin is configured to take “referrer” as first redirect option after successful login
1. Click on password reset link
2. Password reset form is presented. Here info:
clipboard-202406260951-evjop.png
3. Change is successful, it redirects to login page at the end of \TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::changePasswordAction()
4. After successful login, I’m redirected to the password change as it’s part of the referer:
Reviews 2
Related issues 3
- Bug #21943redirect to referer when changing password
- Bug #100772Disabling of referer redirect via redirectReferrer flag is not persisted on login failure
- Bug #101581felogin gives "1554994253: The link you clicked is not valid. Please repeat the forgot password procedure" on first login after password reset
Files 3
History 913
-
Xavier Perseguers changed description 06/26/24, 07:59
-
Xavier Perseguers changed Related to #21943 06/26/24, 07:59
-
Xavier Perseguers changed description 06/26/24, 08:18
-
Xavier Perseguers commented and changed attached clipboard-202406261024-7o9hp.png 06/26/24, 08:32
-
Gerrit Code Review pushed patch set 1 for main to change 84925 status
NewUnder Review 06/26/24, 09:29 -
Xavier Perseguers changed Related to #100772 06/26/24, 12:26
-
Xavier Perseguers changed description 06/26/24, 12:31
-
Torben Hansen changed Related to #101581 06/27/24, 16:25
-
Gerrit Code Review pushed patch set 2 for main to change 84925 06/27/24, 16:53
-
Gerrit Code Review pushed patch set 3 for main to change 84925 06/27/24, 16:59
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 85195 07/11/24, 21:02
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % 07/11/24, 21:05Applied in changeset commit:007367dc0e1b0cfc1c07ca8d791dccefa66bff7c.
-
Benni Mack changed status
ResolvedClosed 10/15/24, 09:29
The actual problem is that the login form presented right after the password change contains the password recovery referrer:
clipboard-202406261024-7o9hp.png
It looks like that referrer is actually extracted from
$_SERVER['HTTP_REFERER']in that context, as part of\TYPO3\CMS\FrontendLogin\Redirect\RedirectHandler::getReferrerForLoginForm()Unsure how to generically detect the URL is actually the form itself in password recovery context. I have the feeling that password recovery link is never logically supposed to be useful in the context of a possibly valid referrer for the login form…