83947[BUGFIX] Use Guzzle request to fetch external error page content
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Thomas Hohn +1
- Christian Kuhn +1
- Benni Mack +1
-
Verified V +2 Done
- Stefan Bürk +2
- Christian Kuhn +1
- Benni Mack +1
- core-ci +1 CI
Issues 3
Files 2
Review log 2026
Show 1 earlier messages
-
Stefan Bürk uploaded patch set 1 04/21/24, 16:02
-
Stefan Bürk updated the commit message in patch set 2 04/21/24, 16:03
-
core-ci voted on patch set 1 V -1 04/21/24, 16:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56428
-
core-ci voted on patch set 2 V -1 04/21/24, 16:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56429
-
Stefan Bürk uploaded patch set 3
V -104/21/24, 16:15 -
core-ci voted on patch set 3 V +1 04/21/24, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56430
-
Garvin Hicking updated the commit message in patch set 4
V +104/21/24, 18:02 -
core-ci voted on patch set 4 V +1 04/21/24, 18:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56438
-
Simon Schaufelberger commented on patch set 4 04/21/24, 18:27
PageContentErrorHandler.php:1562 spacesPageContentErrorHandler.php:165would it be better to use "Requested-By" here?PageContentErrorHandler.php:175above "Content-Type" is used. here lowercase. -
Stefan Bürk voted on patch set 4 CR -1 04/21/24, 19:18
-
Stefan Bürk uploaded patch set 5
CR -1V +104/21/24, 20:03 -
core-ci voted on patch set 5 V +1 04/21/24, 20:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56440
-
Stefan Bürk commented on patch set 5 04/21/24, 20:10
PageContentErrorHandler.php:152ReplyTBH it's absolutly irrelevant, as header names are case-insensitive per RFC, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 > Each header field consists of a case-insensitive field name followed by a colon (":"), optional leading whitespace, the field value, and optional trailing whitespace. Thus all clients, server, parser, tools, libs NOT handling request or response header name in a case-insensitive manner are broken by design. So, technically spoken we could using a randomizer for header name casings and it would still work. NOTE: Request/Response classes used by TYPO3, Guzzle and other libs uses internal lowercasing to handle the case-insenstive manner correctly. Personally, I prefer the all lower-case variant instead of a fancy, technically not relevant or required mixed case variant. However, adjusting it to match you preferences.PageContentErrorHandler.php:156ReplyDonePageContentErrorHandler.php:165Replysee abovePageContentErrorHandler.php:175ReplySee above - literally completly irrelevant. Still, adopting your preference. -
Simon Schaufelberger commented on patch set 5 CR +1 04/21/24, 20:18
PageContentErrorHandler.php:175ReplyPlease don't do things for "me" and "my preference". I just want to be "consistent" and don't do it here so and somewhere else different. -
Thomas Hohn voted on patch set 5 CR +1 04/23/24, 09:23
-
Christian Kuhn uploaded patch set 6
CR +1V +104/23/24, 12:30 -
Christian Kuhn voted on patch set 6 CR +1 V +1 04/23/24, 12:31
-
core-ci voted on patch set 6 V +1 04/23/24, 12:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56574
-
Thomas Hohn voted on patch set 6 CR +1 04/23/24, 12:37
-
Benni Mack voted on patch set 6 CR +1 V +1 04/23/24, 21:25
-
Stefan Bürk voted on patch set 6 CR +2 V +2 04/23/24, 22:16
-
Stefan Bürk merged patch set 7 04/23/24, 22:23
-
Benjamin Franzke commented on patch set 7 04/24/24, 07:18
PageContentErrorHandler.php:96I think the subRequest code should be moved into a `sendInternalRequest()` method to match the `sendExternalRequest()` method. The code in `handlePageError` is right now mixed between being a dispatcher and direct (subrequest) logic.PageContentErrorHandler.php:153This doesn't work if the external error handler is another instance that is using TYPO3 itself (which should work, right? I mean that's what this function is about). The Requested-By Header needs some kind of instanceid (could be created with a a random number hmac'ed with the current system's encryption key). -
Benni Mack commented on patch set 7 04/24/24, 07:20
PageContentErrorHandler.php:153ReplyI actually also had one more thing while lying in bed yesterday... one "could" link to a file. Should we just check for type === TYPE_PAGE only? -
Stefan Bürk commented on patch set 7 04/25/24, 01:02
PageContentErrorHandler.php:96ReplyGood point. Will check and eventually push a follow up.PageContentErrorHandler.php:153Reply@ben@bnf.dev I guess we could remove the requested-by path and avoid introducing something like a instance id. If the configured external url is hitting the same instance, and it is the same site config which matches - then it is already coverd in https://review.typo3.org/c/Packages/TYPO3.CMS/+/83947/7/typo3/sysext/core/Classes/Error/PageErrorHandler/PageContentErrorHandler.php#84L - or if it is another siteconfig with the same external url. If it is a other instance or another matching site config, and again hitting another external error page, I guess the execution should happen. A instance id should not make a difference here - or am I wrong ? @benni@typo3.org You mean if someone enters just a relative path/file in the field OR changing the siteconfig tca to allow additional link handlers ? In latter case I argue that if someone is reconfiguring this, a custom error handler should be implemented along the way. For the first case - good question. If it is of type file, we could just retrieve the file content directly ? instead of a internal request or a external request aka "file content error handler". Maybe these should be dedicated error handlers and do some mixing in this one with a direct deprecation of external url / file handling ? -
Stefan Bürk commented on patch set 7 05/11/24, 17:31
PageContentErrorHandler.php:96ReplyAddressed this with https://review.typo3.org/c/Packages/TYPO3.CMS/+/84191.PageContentErrorHandler.php:153Reply@ben@bnf.dev See https://review.typo3.org/c/Packages/TYPO3.CMS/+/84191, removed the check again. @benni@typo3.org see https://review.typo3.org/c/Packages/TYPO3.CMS/+/84191, moved the intern request into a dedicated method and introduced a type check with fallback to generic html response for unsupported link types.
PageContentErrorHandler.php:152