Review main Merged

82605[TASK] Prevent Extbase errorAction from writing session data

Oliver Hader CR +2 V +2 Hard +334 −9 updated 02/03/26, 10:31

Commit message

Any validation error and the resulting FlashMessage items that is
handled implicitly by the Extbase ActionController::errorAction
will be persisted to a user session. In case the session does not
exist, it will be generated and a new session cookie is sent.

This change aims to make "persisting to session storage" explicit
and to transfer errorAction FlashMessages internally.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Oli Bartsch +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Oli Bartsch +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 2939

Show 914 earlier messages
  1. Oliver Hader uploaded patch set 1 01/23/24, 18:07

  2. core-ci voted on patch set 1 V +1 01/23/24, 18:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52028

  3. Rémy DANIEL commented on patch set 1 05/14/24, 08:13

    Creating a session (and an entry in the database) for the flashmessage queue should be prevented. The solution is quite elegant and looks good to me.
  4. Oliver Hader uploaded patch set 2 V +1 10/27/25, 08:49

  5. core-ci voted on patch set 2 V +1 10/27/25, 08:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87625

  6. Oliver Hader uploaded patch set 3 V +1 10/27/25, 21:11

  7. Oliver Hader rebased onto patch set 4 10/27/25, 21:12

  8. Oliver Hader commented on patch set 4 10/27/25, 21:13

    This change is ready for review.
    It would be possible to back-port this change to `13.4.x` as well, since only `@internal` methods are adjusted. However, it also might be breaking in case those methods were overridden in custom code.
  9. core-ci voted on patch set 4 V -1 10/27/25, 21:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87747

  10. Oliver Hader uploaded patch set 5 V -1 10/27/25, 21:37

  11. core-ci voted on patch set 5 V +1 10/27/25, 21:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87749

  12. Garvin Hicking commented on patch set 5 10/27/25, 22:14

    ActionController.php:553

    (note to self for reviewing: why is addErrorFlashMessage() not executed in the "else" branch, might it be absent in these cases then on a non-redirected validation error? or does this get displayed differently?) also what happens with custom errorAction() implementations without a referal redirect, after calling parent::errorAction() would they need to deal with flash messages on their own? might need more specific rest-file phrasing that currently focusses on redirectResponse and not errorAction() itself..?)
  13. Oliver Hader rebased onto patch set 6 V +1 01/12/26, 17:53

  14. core-ci voted on patch set 6 V -1 01/12/26, 18:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93292

  1. Oliver Hader uploaded patch set 7 V -1 01/14/26, 12:25

  2. core-ci voted on patch set 7 V +1 01/14/26, 12:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93436

  3. Oliver Hader uploaded patch set 8 V +1 01/14/26, 14:04

  4. Oliver Hader commented on patch set 8 01/14/26, 14:06

    The previous test failed due to a flaky functional test case: https://review.typo3.org/c/Packages/TYPO3.CMS/+/92328
  5. core-ci voted on patch set 8 V +1 01/14/26, 14:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93448

  6. Garvin Hicking commented on patch set 8 CR +1 V +1 01/30/26, 09:46

    So, my gut feeling is we should not backport this to 13.4 because I'm a bit afraid of what people may have done in their errorActions or session expectations. I tested a few cases and could at least not create actual issues with it. I think now would be a good time to put this into 14.2 to be abele to address it in the stabilization phase if we get aware of issues.

    ActionController.php:553 Reply

    I think I got this now, due to usage in `initializeStateFromExtbaseRequestParameters()`.
  7. Oliver Hader commented on patch set 8 01/30/26, 09:52

    Reply

    Let's just focus in v14

    Reply

    Absolutely fine & I had the same feeling. Even if it it's `@internal` the risks are high that `errorAction` has been overridden.
  8. Oliver Hader commented on patch set 8 01/30/26, 09:53

    @dogawaf@gmail.com Could you please revote on this change?
  9. Rémy DANIEL voted on patch set 8 CR +1 02/02/26, 09:00

  10. Benni Mack commented on patch set 8 CR -1 02/02/26, 09:09

    -1 I assume we would need the Changelog dir?
  11. Oliver Hader commented on patch set 8 02/02/26, 11:19

    Reply

    True, it should be `14.2` instead
  12. Oliver Hader uploaded patch set 9 CR +1 V +1 02/02/26, 11:21

  13. core-ci voted on patch set 9 V +1 02/02/26, 11:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94809

  14. Garvin Hicking voted on patch set 9 CR +1 V +1 02/02/26, 13:21

  15. Oliver Hader commented on patch set 9 02/02/26, 14:36

    Just realized: This patch celebrates its 2nd anniversary. Happy Birthday 🎉
  16. Oli Bartsch commented on patch set 9 02/02/26, 14:43

    ActionController.php:555

    I would document that it is intended behaviour to forward all current flash messages in the queue and not only the error message of this action.
  17. Oli Bartsch uploaded patch set 10 CR +1 V +1 02/02/26, 18:43

  18. core-ci voted on patch set 10 V +1 02/02/26, 18:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94845

  19. Oli Bartsch uploaded patch set 11 V +1 02/03/26, 08:39

  20. Oli Bartsch voted on patch set 11 CR +1 V +1 02/03/26, 08:41

  21. Oli Bartsch commented on patch set 11 02/03/26, 08:41

    ActionController.php:555 Reply

    Done
  22. core-ci voted on patch set 11 V +1 02/03/26, 08:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94872

  23. Garvin Hicking voted on patch set 11 CR +1 V +1 02/03/26, 08:56

  24. Oliver Hader commented on patch set 11 CR +2 V +2 02/03/26, 10:31

    Thx! 😊
  25. Oliver Hader merged patch set 12 02/03/26, 10:31