Review main Ready for review Stale

94524[BUGFIX] Allow contributors to see redirects linked to deleted pages

Ludovic Nogueira CR +1 V +1 Easy +1 −1 updated 07/13/26, 11:10

Commit message

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

Review

  • Code review CR +1 Needs a vote
    • Sebastien Convers +1
    • Eric Chavaillaz +1
    • Simon Schaufelberger +1
  • Verified V +1 Needs a vote
    • Eric Chavaillaz +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Merge conflicts 1

Issues 1

Files 1

Review log 1113

  1. Ludovic Nogueira uploaded patch set 1 06/17/26, 12:54

  2. core-ci voted on patch set 1 V +1 06/17/26, 13:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103612

  3. Eric Chavaillaz voted on patch set 1 CR +1 V +1 06/17/26, 13:31

  4. Benni Mack updated the commit message in patch set 2 CR +1 V +1 06/17/26, 15:23

  5. core-ci voted on patch set 2 V +1 06/17/26, 15:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103617

  6. Eric Chavaillaz voted on patch set 2 CR +1 V +1 06/18/26, 05:33

  7. Simon Schaufelberger voted on patch set 2 CR +1 V +1 06/26/26, 09:22

  8. Sebastien Convers voted on patch set 2 CR +1 06/30/26, 13:45

  9. Mathias Brodala commented on patch set 2 CR -1 07/10/26, 08:57

    RedirectPermissionGuard.php:113

    How about dropping "false" from the BackendUtility::getRecord() call above instead? Then "$page === null" would match and allow access already.
  10. Ludovic Nogueira commented on patch set 2 07/10/26, 09:08

    RedirectPermissionGuard.php:113 Reply

    Well, any user would be able to see any deleted page then, without checking the rights, no? With my change, you get every page, deleted or not and then you check if the user can see it with his rights, either the page is deleted or not.
  11. Mathias Brodala commented on patch set 2 07/10/26, 09:20

    RedirectPermissionGuard.php:113 Reply

    It's a bit hard to wrap my head around this but I think I understand what you mean. Your goal is to respect the permissions of deleted pages too. Here I wonder if that makes sense given that permission setups can change over time but deleted pages are not updated accordingly.
  12. Ludovic Nogueira commented on patch set 2 07/10/26, 12:08

    RedirectPermissionGuard.php:113 Reply

    This is a regression introduced earlier this year here: https://github.com/TYPO3-CMS/redirects/commit/96e316ae878f2fc28b5e5782a799f787c346d7d0 So, the objective was to disallow non-admin users from seeing redirects from pages they don't have access to. But it omitted deleted pages. So my fix for that is better than what you are suggesting. For some websites with many groups (like ours), you don't want user A to see what user B is doing (multi-site, sub-parts of a website, etc.). Also, a website should use the garbage collector and delete deleted elements each X days/months, so it's not really an issue that the setups change over time. BUT the change introduced earlier still raises an issue (thankfully for us, it's not). If user A created a redirection "/test", and user B wants to add the exact same redirection, they'll be able to without knowing it exists already, they'll know as soon as they try it on the frontend and it redirects to another page. It should maybe raise a new feature, a revert or something, but it's out of this bugfix.
  13. Mathias Brodala commented on patch set 2 CR 0 07/13/26, 11:10

    RedirectPermissionGuard.php:113 Reply Unresolved

    > Also, a website should use the garbage collector and delete deleted elements each X days/months, so it's not really an issue that the setups change over time. Still this is optional and I dare to say that most setups don't do such cleanup but keep piling up obsolete records forever. Anyways I can accept this change with your explanation.