New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUGFIX: Dont log stack trace for InvalidHashException
in Production
#3247
BUGFIX: Dont log stack trace for InvalidHashException
in Production
#3247
Conversation
/cc @mrimann |
@kdambekalns thanks for cc'ing me - looks fine by pure reading. But did not test. Looking forward to getting this released :-) Thanks for your work! |
Just something to think about: Wouldn't it make sense to choose a more general group name, that still makes sense, if we discover additional exception types, we dont want to write stack traces for the same reasons? Or do you think, that we should follow the recipe here then: Add another group for the new exception type? |
Mmm, fair point, could be generic as in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, agree to what @fcool wrote but I am fine either way.
Would be fine with me, but I am too lazy to fix that now. 😬 Feel free to adjust this, you can work on this PR – just keep in mind the rendering config needs to be adjusted (the message would be misleading for other exceptions…) |
@kdambekalns is the review from @albe mandatory to proceed with this issue? Or could someone else review it? If so, who could be that additional reviewer? |
InvalidHashException
in Production
Im not sure that this fix works. I tested it by tampering with the but via #2685 we log the throwable directly and set the content to
But yes the herby introduces error group will not be used in that case, because the exception doesnt bubble up that far. |
A late showstopper? I need to try (again), I am pretty sure it worked, though it may not work in all cases. But when those are caught and handled differently, without creating a trace file, they do not cause the problem this is trying to solve. |
Yeah this seems fine, it then is only a question of setting log levels for production |
30d85ca
to
28ffc30
Compare
Rebased on 7.3, changed the rendering group name to Now I'll test again, to check if it actually makes a difference… |
Test protocol
Scenarios from #3159 (comment) Unpatched sources
The notice and trace come from Patched sources
Scenario 2 needs to be fixed… Patches sources, part twoThis is with 5f29d10
|
This configures a `noStacktraceExceptionGroup` exception handler rendering group and configures it to not dump stack traces in `Production` context. For `Development` context stack traces are still written to ease debugging. The rendering group contains only the `InvalidHashException` for now. See neos#3159
28ffc30
to
06820c8
Compare
06820c8
to
5f29d10
Compare
This configures an
invalidHashExceptions
exception handler rendering group and configures it to not dump stack traces inProduction
context. ForDevelopment
context stack traces are still written to ease debugging.See #3159
Upgrade instructions
In case you need trace dumps for
InvalidHashException
in production context, override the settings as needed.Review instructions
See #3159 for ways to trigger those exceptions. Then check if a trace is dumped.
Checklist
FEATURE|TASK|BUGFIX
Reviewer - Breaking Changes are marked with!!!
and have upgrade-instructions