wasphin opened a new pull request, #3533:
URL: https://github.com/apache/brpc/pull/3533

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Problem Summary:
   
   The Discovery naming-service parser looks up members in several JSON values
   without first checking that those values are objects. Malformed Discovery
   responses can therefore violate the RapidJSON object-access precondition.
   
   ### What is changed and the side effects?
   
   Changed:
   
   - Skip non-object entries in the Discovery node list.
   - Reject non-object data, service, and instance values in service responses.
   - Cover malformed values through the existing Discovery client/server test.
   
   Side effects:
   
   - Performance effects: only constant-time JSON type checks are added.
   - Breaking backward compatibility: malformed responses that previously 
reached
     object-only accessors are now skipped or rejected.
   
   ---
   ### Check List:
   
   - [x] The changes are compilable.
   - [x] Related unit tests are included.
   - [x] The Contributor Covenant Code of Conduct is followed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to