Implement Oj::Parser.safe with configurable JSON safety limits#1007
Implement Oj::Parser.safe with configurable JSON safety limits#1007ohler55 merged 2 commits intoohler55:developfrom
Conversation
36766e7 to
9e4d11c
Compare
Introduce a safe parser mode that enforces limits for array size, hash size, nesting depth, and total elements to reduce risk from oversized or deeply nested payloads.
9e4d11c to
9ef4cba
Compare
|
I probably need to take a look at the clang-formatter rules. I'm surprised the conditionals without brackets didn't get flagged. Please add the brackets. I didn't check all lines but it seemed like some might have been over 120 characters. If there are lines longer than that please change. If all are under 120 then it is fine. The content, while different than my code looks fine otherwise. Thanks for the new addition. |
0de35f6 to
1e6224a
Compare
|
Thanks for your initial review @ohler55! I have changed the branches to always have brackets.
The longest line is exactly 120 characters, so it's fine I guess. |
|
Thank you for the contribution. |
Introduce a safe parser mode that enforces limits for array size, hash size, nesting depth, and total elements to reduce risk from oversized or deeply nested payloads.