fix(core): permit Symbol and HashWithIndifferentAccess in log entries - #6529
Open
tvdeyen wants to merge 1 commit into
Open
fix(core): permit Symbol and HashWithIndifferentAccess in log entries#6529tvdeyen wants to merge 1 commit into
tvdeyen wants to merge 1 commit into
Conversation
Serialized log entry details frequently contain symbols and HashWithIndifferentAccess instances (e.g. from payment gateway responses and request params). Because neither class was permitted, serializing such details raised a DisallowedClass error while writing `parsed_details=` unless every integrator added them to `log_entry_permitted_classes` themselves. Since both are core Ruby and Rails value types with no safe-loading risk here, permit them by default.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6529 +/- ##
==========================================
- Coverage 95.07% 92.38% -2.70%
==========================================
Files 460 42 -418
Lines 7924 788 -7136
==========================================
- Hits 7534 728 -6806
+ Misses 390 60 -330 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Serialized log entry details frequently contain symbols and
HashWithIndifferentAccessinstances (e.g. from payment gateway responses and request params). Because neither class was permitted, serializing such details raised a DisallowedClass error while writingparsed_details=unless every integrator added them tolog_entry_permitted_classesthemselves. Since both are core Ruby and Rails value types with no safe-loading risk here, permit them by default.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: