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

Review main Ready for review Orphaned

88541[BUGFIX] Invoke correct 404 / 403 error action

Sybille Peters CR 0 V -1 Normal +161 −21 updated 03/12/26, 14:33

Commit message

In some scenarios, a 403 status code were issued for pages where a 404
status code was more appropriate.

This is now changed, so that a 404 is invoked for subpages of hidden,
startime, endtime and extendToSubpages=1 and a 403 is still invoked
if denied by FE user group.

Also, some of the messages and reasons have changed, to give a more
appropriate message, for example 'Access denied by frontend user'
instead of 'ID was not an accessible page'.

The class RecordAccessVoter::accessGranted now sets some values
for the status code, reason of error and error message which
can be queried.

To make this non-breaking, the values are currently optional and will be
set to a reasonable value in the calling function.

The event RecordAccessGrantedEvent can now also set these values, but
this is also optional to make it non-breaking.

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 10
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/41/88541/10 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/41/88541/10 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Issues 1

Files 5

Review log 1626

Show 1 earlier messages
  1. Sybille Peters uploaded patch set 1 03/09/25, 09:59

  1. Sybille Peters commented on patch set 1 03/09/25, 10:02

    Unresolved

    Check other cases where RecordAccessVoter::accessGranted or RecordAccessVoter::accessGrantedForPageInRootLine is called in the core.
  2. Sybille Peters commented on patch set 1 03/09/25, 10:03

    PageInformationFactory.php:460 Unresolved

    Should we really use ROOTLINE_BROKEN broken here?
  3. core-ci voted on patch set 1 V -1 03/09/25, 10:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75369

  4. Sybille Peters uploaded patch set 2 V -1 03/09/25, 12:33

  5. Sybille Peters updated the commit message in patch set 3 03/09/25, 12:37

  6. core-ci voted on patch set 2 V -1 03/09/25, 12:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75373

  7. core-ci voted on patch set 3 V -1 03/09/25, 12:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75374

  8. Sybille Peters updated the commit message in patch set 4 V -1 03/11/26, 19:13

  9. Sybille Peters updated the commit message in patch set 5 03/11/26, 19:13

  10. Sybille Peters updated the commit message in patch set 6 03/11/26, 19:13

  11. core-ci voted on patch set 4 V -1 03/11/26, 19:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97773

  12. core-ci voted on patch set 5 V -1 03/11/26, 19:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97774

  13. core-ci voted on patch set 6 V -1 03/11/26, 19:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97775

  14. Sybille Peters uploaded patch set 7 V -1 03/11/26, 19:29

  15. Sybille Peters updated the commit message in patch set 8 03/11/26, 19:31

  16. core-ci voted on patch set 7 V -1 03/11/26, 20:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97776

  17. core-ci voted on patch set 8 V -1 03/11/26, 20:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97778

  18. Andreas Kienast commented on patch set 8 03/12/26, 05:52

    The file `typo3/install.php` does not exists anymore, please remove it from your patch.
  19. Sybille Peters uploaded patch set 9 V -1 03/12/26, 10:34

  20. Sybille Peters commented on patch set 9 03/12/26, 10:34

    Reply

    Done
  21. core-ci voted on patch set 9 V -1 03/12/26, 11:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97814

  22. Stefan Bürk commented on patch set 9 03/12/26, 11:40

    PageInformationFactory.php:503

    Exception code is duplicate. Should be either a new exception code (timestamp) or the logic needs to change to use one exception throw/code with different messages/responses. Because this changes the logic and introducing other behaviour I'd strive for a new exception code here.
  23. Sybille Peters uploaded patch set 10 V -1 03/12/26, 14:19

  24. Sybille Peters commented on patch set 9 03/12/26, 14:20

    PageInformationFactory.php:503 Reply

    Yes, this was also reprimanded by CI: Build/Scripts/runTests.sh -s checkIntegrityPhp -p 8.2 https://git.typo3.org/typo3/CI/cms/-/jobs/5434806 How to I get a new exception code? I just used the current timestamp. Seems reasonable.
  25. core-ci voted on patch set 10 V -1 03/12/26, 14:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97833