Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Orphaned

78884[BUGFIX] Evaluate flag `redirectReferrer` of felogin for referrer redirect

Ayke Halder CR 0 V 0 Normal +57 −22 updated 04/14/25, 19:42

Commit message

redirect

This makes the deactivation flag `redirectReferrer` usable for the
login form.
It adds `redirectReferrer=off` to the back-to-login link on the
password recovery form. So users, which come from password recovery
and then perform a successful login, are not redirected back
to password recovery again.

`redirectReferrer` is already implemented as an input field (POST)
in Fluid. Without this fix `redirectReferrer` is evaluated via GET
only and never via POST.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 13
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/84/78884/13 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/84/78884/13 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote

Issues 1

Files 6

Review log 2334

Show 59 earlier messages
  1. Ayke Halder uploaded patch set 1 04/27/23, 16:40

  2. core-ci voted on patch set 1 V +1 04/27/23, 16:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41275

  3. Ayke Halder uploaded patch set 2 V +1 04/27/23, 19:19

  4. Ayke Halder uploaded patch set 3 04/27/23, 19:40

  5. core-ci voted on patch set 2 V -1 04/27/23, 19:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41277

  6. Ayke Halder uploaded patch set 4 04/27/23, 19:50

  7. core-ci voted on patch set 3 V -1 04/27/23, 19:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41278

  8. Ayke Halder uploaded patch set 5 V -1 04/27/23, 20:26

  9. core-ci voted on patch set 4 V -1 04/27/23, 20:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41279

  1. core-ci voted on patch set 5 V +1 04/27/23, 20:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41280

  2. Markus Klein commented on patch set 5 04/28/23, 06:48

    This redirectReferrer parameter is not documented anywhere. I suggest we take the chance of this patch and add it to the docs now too.
  3. Ayke Halder uploaded patch set 6 V +1 04/28/23, 11:40

  4. core-ci voted on patch set 6 V +1 04/28/23, 11:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41293

  5. Benni Mack updated the commit message in patch set 7 V +1 05/03/23, 09:49

  6. Benni Mack rebased onto patch set 8 06/15/23, 21:52

  7. core-ci voted on patch set 8 V +1 06/15/23, 22:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42697

  8. Markus Klein uploaded patch set 9 V +1 07/02/23, 11:21

  9. core-ci voted on patch set 9 V +1 07/02/23, 11:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43193

  10. Ayke Halder uploaded patch set 10 V +1 07/15/24, 14:27

  11. core-ci voted on patch set 10 V +1 07/15/24, 14:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61591

  12. Torben Hansen commented on patch set 10 07/15/24, 15:05

    Side note: I think parts of this have already been fixed with https://review.typo3.org/c/Packages/TYPO3.CMS/+/84925
  13. Ayke Halder commented on patch set 10 07/15/24, 15:20

    Reply

    https://review.typo3.org/c/Packages/TYPO3.CMS/+/84925 only implements `GET`, so we might need to implement `POST`. And we need to decide if we want to use: * GET/POST `tx_felogin_login['redirectReferrer']` or * GET/POST `redirectReferrer` - like for `referer` Also the view variable `referer` only contains the referrer-url. The view variable `redirectReferrer` is actually the flag to turn referrer redirection `off`. Also see `typo3/sysext/felogin/Resources/Private/Templates/Login/Login.html` ```html <div class="felogin-hidden"> <f:form.hidden name="logintype" value="login"/> <f:if condition="{redirectURL}!=''"> <f:form.hidden name="redirect_url" value="{redirectURL}" /> </f:if> <f:if condition="{referer}!=''"> <f:form.hidden name="referer" value="{referer}" /> </f:if> <f:if condition="{redirectReferrer}!=''"> <f:form.hidden name="redirectReferrer" value="off" /> </f:if> <f:if condition="{noRedirect}!=''"> <f:form.hidden name="noredirect" value="1" /> </f:if> </div> ```
  14. Markus Klein updated the commit message in patch set 11 V +1 08/18/24, 18:48

  15. Markus Klein commented on patch set 11 08/18/24, 18:50

    Reply

    Done
  16. Markus Klein commented on patch set 12 08/18/24, 18:52

    Published edit on patch set 11.
  17. core-ci voted on patch set 11 V -1 08/18/24, 18:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63729

  18. core-ci voted on patch set 12 V -1 08/18/24, 18:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63730

  19. Benni Mack updated the commit message in patch set 13 V -1 10/18/24, 13:43

  20. Torben Hansen commented on patch set 13 11/20/24, 20:16

    I tested the patch and in general, it fixes the problem and the `redirectReferrer` flag is now evaluated via GET and POST. We however need some tests for the functionality. Please refer to https://review.typo3.org/c/Packages/TYPO3.CMS/+/84925 for an example.
  21. Benni Mack commented on patch set 13 03/28/25, 08:32

    Now that the other parts are in, I wonder if we still need this change?
  22. Benni Mack marked it work in progress 03/28/25, 08:59

  23. Ayke Halder commented on patch set 13 03/28/25, 09:08

    Current state is to use "RedirectLoginErrorHandler". So actually I do not rely on this referrer implementation anymore. Not abandoning this change, so that anyone who needs referrer can pick this change up.
  24. Torben Hansen wrote 04/05/25, 12:54

    Removed reviewer Torben Hansen.
  25. Benni Mack wrote 04/14/25, 19:42

    Removed cc Benni Mack.