Review main Abandoned

88833[FEATURE] Write stack trace to logs in ProductionExceptionHandler

Sybille Peters CR 0 V 0 Easy +50 −0 updated 04/24/25, 13:32

Commit message

The ProductionExceptionHandler now also writes stack traces in
the log messages by default (as is already the case in the frontend
ProductionExceptionHandler and in the core DebugExceptionHandler).

This may impact logging via the logging framework in Backend and
CLI context.

The behaviour is made configurable via Global Configuration
([SYS][productionExceptionHandlerLogStackTrace]).

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 4

Review log 1216

  1. Sybille Peters uploaded patch set 1 03/29/25, 08:13

  2. core-ci voted on patch set 1 V -1 03/29/25, 08:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76631

  3. Sybille Peters uploaded patch set 2 V -1 03/29/25, 10:38

  4. core-ci voted on patch set 2 V +1 03/29/25, 10:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76634

  5. Georg Ringer commented on patch set 2 03/30/25, 08:03

    I wonder why we need a new configuration and not just have it always on.
  6. Sybille Peters commented on patch set 2 03/30/25, 08:09

    Reply Unresolved

    I was wondering why it was off in the first place. So, I thought there might be some reason to do so. If that is not the case, we can remove it.
  7. Sybille Peters rebased onto patch set 3 V +1 03/30/25, 08:10

  8. core-ci voted on patch set 3 V +1 03/30/25, 08:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76661

  9. Georg Ringer voted on patch set 3 CR +1 V +1 04/20/25, 15:02

  10. Sybille Peters rebased onto patch set 4 CR +1 V +1 04/20/25, 15:02

  11. core-ci voted on patch set 4 V +1 04/20/25, 15:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77976

  12. Christian Kuhn commented on patch set 4 CR -1 04/23/25, 10:49

    i think we should go without the toggle. i'll update the patch.
  13. Christian Kuhn commented on patch set 4 04/24/25, 10:59

    i'm afraid we shouldn't do this at all: not logging the trace has been implemented with security patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/74903 due to potentially sensible information in the logs. it looks as if we should not re-add this, not even if its covered by a feature toggle. i'd give the sec team a change for a review, but tend to abandon at the moment if there is no further feedback.
  14. Oliver Hader commented on patch set 4 CR -2 04/24/25, 12:33

    We addressed that a security vulnerability in https://github.com/TYPO3/typo3/commit/c93ea692e7dfef03b7c50fe5437487545bee4d6a In case one needs exception traces (with the risk of disclosing e.g. credentials in logs), the core `DebugExceptionHandler` has to be used. The frontend "Production"ExceptionHandler is somehow special - actually it's a DebugExceptionHandler as well, since it needs to be activated explicitly. However, that class in `ext:frontend` does not inherit from the `AbstractExceptionHandler` and has an own frontend-specific interface... From my POV, there should be a similar `DebugExceptionHandler` for the frontend as well (logging exception traces). The current `ProductionExceptionHandler` should not log the exception trace. As a consequence `config.exceptionHandler` would have to be extended to support e.g. `production` (or `1`) or `debug` or any other individual implementation class.
  15. Christian Kuhn commented on patch set 4 04/24/25, 13:32

    alright. thx for feedback. so the consensus with this patch is: it can't make it due to security considerations, and we may have a look at the FE setup eventually instead.
  16. Christian Kuhn abandoned the change 04/24/25, 13:32