Skip to content
Snippets Groups Projects
  1. Apr 24, 2024
    • Stefan Bürk's avatar
      [BUGFIX] Use Guzzle request to fetch external error page content · 36b63a8c
      Stefan Bürk authored
      TYPO3 provides the ability to configure different error handlers for
      specific (or all) error codes, as well as the error handler type
      to use (core handler or custom).
      
      The `\TYPO3\CMS\Core\Error\PageErrorHandler\PageContentErrorHandler`
      allows to specify a target using the link handler. The default config
      allows to define `LinkService::TYPE_PAGE` and `LinkService::TYPE_URL`.
      
      After implementing and stabilizing the TYPO3 sub-request feature,
      this particular error handler has been refactored to use an internal
      sub-request to resolve the error page content: An external URL not
      matching the same instance or having a page unavailable within
      the TYPO3 instance will not return any content.
      
      This change modifies the `PageContentErrorHandler` to send a Guzzle
      request for an external URL instead of using internal sub-requests,
      even if it would access the originating instance again. A limitation
      is that the requested URL **must** return a HTTP status-code 200.
      
      A custom request header is attached to this request. It is then
      checked to avoid recurring errors or loops in the page-resolving
      workflow.
      
      Resolves: #103399
      Related: #98396
      Related: #94402
      Releases: main, 12.4
      Change-Id: If09158abd2aa9246bcb7a4fa41a0ad6e4a0f942c
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83947
      
      
      Reviewed-by: default avatarThomas Hohn <tho@gyldendal.dk>
      Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
      Tested-by: default avatarBenni Mack <benni@typo3.org>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
      Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
      Reviewed-by: default avatarBenni Mack <benni@typo3.org>
      Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
      36b63a8c
  2. Apr 23, 2024
  3. Apr 22, 2024
  4. Apr 21, 2024
  5. Apr 20, 2024
  6. Apr 19, 2024