Review main Merged

94883[BUGFIX] Prevent infinite recursion for self-linking doktype=3 pages

Oliver Hader CR +2 V +2 Normal +73 −1 updated 07/23/26, 10:18

Commit message

A page of doktype "Link" whose link resolves to the current
page (e.g. link = '#') recursed indefinitely in
PageLinkBuilder::buildLink(), since "current" always resolves
to the page currently rendered for the request. This was
directly triggerable by visiting such a page's own frontend
URL, since ShortcutAndMountPointRedirect hits the same code
path while still holding the page-cache generation lock.

Reject a page linking to itself before recursing: since
"current" always resolves to the page currently being
rendered, resolving it again on the same page is guaranteed
to reproduce the identical state forever. Also stop the
middleware from redirecting to an empty target URL when
resolution fails.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Benjamin Franzke +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Benjamin Franzke +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 78

  1. Oliver Hader uploaded patch set 1 07/22/26, 11:43

  2. core-ci voted on patch set 1 V +1 07/22/26, 11:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105165

  3. Benjamin Franzke voted on patch set 1 CR +1 V +1 07/23/26, 10:01

  4. Andreas Kienast voted on patch set 1 CR +1 V +1 07/23/26, 10:01

  5. Andreas Kienast commented on patch set 1 07/23/26, 10:03

  6. Oliver Hader commented on patch set 1 07/23/26, 10:17

    Reply

    Yepp. Seems I accidentally pushed a new change-id...
  7. Oliver Hader voted on patch set 1 CR +2 V +2 07/23/26, 10:18

  8. Oliver Hader merged patch set 2 07/23/26, 10:18