Project

General

Profile

Actions

Bug #104214

closed

Broken redirect to referrer after changing password

Added by Xavier Perseguers 5 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
felogin
Target version:
-
Start date:
2024-06-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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:

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:


Files

clipboard-202406260951-evjop.png (84.4 KB) clipboard-202406260951-evjop.png Xavier Perseguers, 2024-06-26 07:51
clipboard-202406260958-nygji.png (371 KB) clipboard-202406260958-nygji.png Xavier Perseguers, 2024-06-26 07:58
clipboard-202406261024-7o9hp.png (39.1 KB) clipboard-202406261024-7o9hp.png Xavier Perseguers, 2024-06-26 08:24

Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #21943: redirect to referer when changing passwordClosed2010-01-11

Actions
Related to TYPO3 Core - Bug #100772: Disabling of referer redirect via redirectReferrer flag is not persisted on login failureUnder Review2023-04-27

Actions
Related to TYPO3 Core - Bug #101581: felogin gives "1554994253: The link you clicked is not valid. Please repeat the forgot password procedure" on first login after password resetClosed2023-08-04

Actions
Actions #1

Updated by Xavier Perseguers 5 months ago

  • Description updated (diff)
Actions #2

Updated by Xavier Perseguers 5 months ago

  • Related to Bug #21943: redirect to referer when changing password added
Actions #3

Updated by Xavier Perseguers 5 months ago

  • Description updated (diff)
Actions #4

Updated by Xavier Perseguers 5 months ago

The actual problem is that the login form presented right after the password change contains the password recovery referrer:

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...

Actions #5

Updated by Gerrit Code Review 5 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84925

Actions #6

Updated by Xavier Perseguers 5 months ago

  • Related to Bug #100772: Disabling of referer redirect via redirectReferrer flag is not persisted on login failure added
Actions #7

Updated by Xavier Perseguers 5 months ago

  • Description updated (diff)
Actions #8

Updated by Torben Hansen 5 months ago

  • Related to Bug #101581: felogin gives "1554994253: The link you clicked is not valid. Please repeat the forgot password procedure" on first login after password reset added
Actions #9

Updated by Gerrit Code Review 5 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84925

Actions #10

Updated by Gerrit Code Review 5 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84925

Actions #11

Updated by Gerrit Code Review 4 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85195

Actions #12

Updated by Anonymous 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF