-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add pb2json depth limit #3099
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
Add pb2json depth limit #3099
Conversation
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.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
chenBright
left a comment
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.
LGTM
* Add pb2json depth limit * fix multi json test case failed * define DEEP_RECURSION_TEST_DEPTH constant * Remove duplicate root_msg and root_val param
* Add pb2json depth limit * fix multi json test case failed * define DEEP_RECURSION_TEST_DEPTH constant * Remove duplicate root_msg and root_val param
What problem does this PR solve?
Issue Number: NULL
Problem Summary: Add pb2json depth limit
What is changed and the side effects?
Changed: Add recursion depth limit for ProtoMessageToJson, ProtoMessageToProtoJson, JsonToProtoMessage, ProtoJsonToProtoMessage
Side effects:
Performance effects: Slightly cost more CPU in the pb2json and json2pb functions
Breaking backward compatibility: pb message or json with a depth > 100 will convert fail. User can increase the gflag json2pb_max_recursion_depth to handle larger depth.
Check List: