Bug #88080

ProductionExceptionHandler should relay ImmediateResponseExceptions

Added by Jonas Schwabe 5 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2019-04-04
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I just noticed that ProductionExceptionHandler tries to handle ImmediateResponseException by rendering an "Oops, an error occurred" string. From what I understand this is not correct, the handler should at least relay the exception so that it can be handled accordingly.

Doc comment says:

/**
 * Exception that has to be handled immediately in order to have
 * stop current execution and provide the current response. This
 * exception is used as alternative to previous die() or exit().
 *
 * @internal
 */

An ImmediateResponseException is for example thrown on cHash validation errors when pageNotFoundOnCHashError is set to "true" which then leads to Oops messages being cached when a user serves to an uncached page with an unknown GET param...

This only happens when TYPO3 is running in Production mode or the ProductionExceptionHandler is used in Dev / Staging context.

Associated revisions

Revision c82de6d0 (diff)
Added by Jonas Schwabe about 2 months ago

[BUGFIX] ImmediateResponseException needs to be relayed

ImmediateResponseException were not handled correctly during content
object rendering when running in a production environment.
This patch makes sure that ImmediateResponses are handled as such instead
of just printing them during template rendering.

Resolves: #88080
Releases: master, 9.5
Change-Id: Id211b4064b438b3df0744c7a0de90b642ed872de
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60370
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Tested-by: Jonas Schwabe <>
Tested-by: Daniel Goerz <>
Reviewed-by: Benni Mack <>
Reviewed-by: Jonas Schwabe <>
Reviewed-by: Daniel Goerz <>

Revision b4c6b926 (diff)
Added by Jonas Schwabe about 2 months ago

[BUGFIX] ImmediateResponseException needs to be relayed

ImmediateResponseException were not handled correctly during content
object rendering when running in a production environment.
This patch makes sure that ImmediateResponses are handled as such instead
of just printing them during template rendering.

Resolves: #88080
Releases: master, 9.5
Change-Id: Id211b4064b438b3df0744c7a0de90b642ed872de
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61176
Tested-by: TYPO3com <>
Tested-by: Daniel Goerz <>
Reviewed-by: Daniel Goerz <>

History

#1 Updated by Gerrit Code Review 5 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60370

#2 Updated by Gerrit Code Review 5 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60370

#3 Updated by Gerrit Code Review 5 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60370

#4 Updated by Gerrit Code Review about 2 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60370

#5 Updated by Gerrit Code Review about 2 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60370

#6 Updated by Gerrit Code Review about 2 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61176

#7 Updated by Jonas Schwabe about 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF