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

Review main Work in progress Orphaned

84191[TASK] Streamline `PageContentErrorHandler`

Stefan Bürk CR 0 V -1 Normal +41 −27 updated 03/25/25, 15:54

Commit message

Since #103399 the PageContentErrorHandler uses Guzzle to make a
full external request for external error page content urls with
a specific header to guard calling the same TYPO3 instance with
a invalid error page.

A dedicated sub method has been added to handle the external
request handling, while keeping the internal sub-request in
the main `handlePageError()` method.

This change modifies the `PageContentErrorHandler` to ...

* move the sub-request handling into a dedicated method.
* decide based on the URL type to send an internal or external
  request and returning a default HtmlResponse for not supported
  types.
* use internal sub-request for record linkhandler links in case
  TCA has been adjusted to allow them as error page content source.
* remove the custom request header for the external request and
  the check against header to avoid returning a generic error page
  content instead of a error page if it hits another TYPO3 instance.

Note: E-Mail and Telephone LinkHandler has been decided to be invalid
as error page content source and thus return a generic HtmlResponse,
which also counts for custom linkhandler. Custom ErrorHandler should
be implemented along with custom linkhandler in these cases.

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

Review

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

Issues 2

Files 1

Review log 711

  1. Stefan Bürk uploaded patch set 1 05/11/24, 17:29

  2. core-ci voted on patch set 1 V +1 05/11/24, 17:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57522

  3. Benjamin Franzke commented on patch set 1 CR -1 05/13/24, 16:13

    PageContentErrorHandler.php:101

    Looks like a possible XSS injection, also next line should be HSC'd to be sure.
  4. Stefan Bürk uploaded patch set 2 CR -1 V +1 05/13/24, 20:36

  5. Stefan Bürk commented on patch set 2 05/13/24, 20:36

    PageContentErrorHandler.php:101 Reply Unresolved

    @ben@bnf.dev changed - can you recheck ?
  6. core-ci voted on patch set 2 V +1 05/13/24, 20:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57647

  7. Stefan Bürk rebased onto patch set 3 V +1 06/07/24, 23:34

  8. core-ci voted on patch set 3 V +1 06/07/24, 23:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58886

  9. Benni Mack updated the commit message in patch set 4 V +1 10/18/24, 13:31

  10. core-ci voted on patch set 4 V -1 10/18/24, 22:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67985

  11. Benni Mack marked it work in progress 03/25/25, 15:54