86611[BUGFIX] Log debug message on Reaction payload JSON decode error
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Benjamin Franzke +1
-
Verified V +2 Done
- Garvin Hicking +2
- Benjamin Franzke +1
- core-ci +1 CI
Issues 1
Files 3
Review log 2732
Show 47 earlier messages
-
Mathias Brodala uploaded patch set 1 10/16/24, 14:49
-
core-ci voted on patch set 1 V +1 10/16/24, 14:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67887
-
Mathias Brodala uploaded patch set 2
V +110/16/24, 14:59 -
core-ci voted on patch set 2 V +1 10/16/24, 15:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67889
-
Garvin Hicking commented on patch set 2 CR +1 V +1 10/16/24, 16:11
Logging this in debug sounds reasonable to me (shouldn't occur in production then and produce possibly huge log files). -
Oliver Hader updated the commit message in patch set 3
CR +1V +110/18/24, 13:54 -
core-ci voted on patch set 3 V +1 10/18/24, 19:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68079
-
Garvin Hicking voted on patch set 3 CR +1 V +1 10/18/24, 19:17
-
Christian Kuhn voted on patch set 3 CR +1 V +1 01/14/25, 14:33
-
Benjamin Franzke commented on patch set 3 CR -2 01/14/25, 15:37
ReactionHandler.php:83 -
Christian Kuhn commented on patch set 3 01/14/25, 15:49
ReactionHandler.php:83Replyack. which data is fine to log here? looking at your reference, it seems 'message' is fine from a security point of view and logging the full exception (with trace) is not. what about payload/body? -
Benjamin Franzke commented on patch set 3 01/14/25, 16:17
ReactionHandler.php:83Replyack, that's what we need to decide. and questions like fullpath-information (as brought up in other patches) play into that… I think we should adapt the logger – https://github.com/TYPO3/typo3/blob/1bd1923ef7fb3290e9e8303a2a30bc34c1dc83f6/typo3/sysext/core/Classes/Log/Writer/FileWriter.php#L150 – first to reduce the likelihood of slip-throughs as in https://typo3.org/security/advisory/typo3-core-sa-2025-001. E.g. by always formatting the exception with minimal information, but without a trace (instead of just stringifying it). Then maybe(?) wait for custom log-writers to do the same and then patches like this can go in. I know, that sounds like quite some delay, but I want to prevent a new security-issue here. -
Christian Kuhn commented on patch set 3 01/27/25, 13:36
ReactionHandler.php:83ReplyOk. So we leave out $e, but keep $body: There is a full $this->logger->info($request) in handleReaction() above, we could follow with this case here, I suppose. I guess we could handle improvements of the logger with dedicated patches and could push this one forward meanwhile? Would you like to update this change to exclude $e, Benjamin? -
Garvin Hicking commented on patch set 3 04/08/26, 20:03
ReactionHandler.php:83Replybump? -
Benni Mack updated the commit message in patch set 4
CR +1V +104/22/26, 06:26Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 4 V -1 04/22/26, 06:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100702
-
Christian Kuhn wrote 06/18/26, 23:08
Removed reviewer Christian Kuhn. -
Garvin Hicking abandoned the change 10/02/26, 12:28
no more feedback -
Mathias Brodala restored the change 10/02/26, 12:39
-
Mathias Brodala commented on patch set 4 10/02/26, 12:40
This is still relevant but I'd also like to have feedback how to proceed. -
Benjamin Franzke uploaded patch set 5
V -110/07/26, 10:43Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
Benjamin Franzke commented on patch set 5 10/07/26, 10:43
ReactionHandler.php:83ReplyI'm sorry for not comming back to this, I lost track of this review. I'm actually unsure, since we have other cases where we already allow similar exceptions. One intresting case is the following, which allowed exception logging in debug scenarios: > 74903: [SECURITY] Do not log stacktrace in exception handlers | https://review.typo3.org/c/Packages/TYPO3.CMS/+/74903 Since this is a `debug` log I would actually say we *could allow to add the full exception*, on the other hand there is one thing to consider: The trace is not relevant. I agree though, that the payload is relevant, since json_decode almost always only responds with a message like "Syntax error" and since debug log needs to be explicitly enabled via TYPO3_CONF_VARS.LOG (debug preset alone does not suffice), we are fine with logging the payload for debugging purposes. I've adapted the patch accordingly. Hope that's fine with you. -
Benjamin Franzke commented on patch set 5 10/07/26, 10:43
Reply
Done -
core-ci voted on patch set 5 V +1 10/07/26, 10:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110301
-
Mathias Brodala commented on patch set 5 10/07/26, 12:44
ReactionHandler.php:82IMO this should be the last line of the method. This way we avoid a type error in case the PayloadDecoder ever starts throwing other kinds of exceptions. -
Mathias Brodala commented on patch set 5 10/07/26, 12:44
ReactionHandler.php:83ReplyPerfectly fine with me, thanks. -
Garvin Hicking commented on patch set 5 CR +1 V +1 10/07/26, 12:50
(I'm fine either way with the placement of the try/catch line[s]) -
Garvin Hicking commented on patch set 5 CR +2 V +2 10/10/26, 08:48
ReactionHandler.php:82ReplyI think it's fine for the time being, if we modify the exceptions I would expect modifications check for current usages of the method and see that catches need adoption. -
Garvin Hicking commented on patch set 5 CR +1 V +1 10/10/26, 08:50
Backport needs love 🫣 -
Garvin Hicking voted on patch set 5 CR +2 V +2 10/21/26, 11:57
-
Garvin Hicking commented on patch set 5 10/21/26, 13:34
Reply
Done -
Garvin Hicking merged patch set 6 10/21/26, 13:36