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

   ### What problem does this PR solve?
   
   Issue Number: resolve
   
   Problem Summary:
   
   Couchbase request builders can narrow key, bucket, and body lengths to the
   protocol's 16-bit and 32-bit fields while appending the full input. Oversized
   inputs can produce malformed frames and desynchronize the connection.
   
   ### What is changed and the side effects?
   
   Changed:
   
   - Validate key, bucket, body, and SASL authentication payload lengths before
     serialization.
   - Reject oversized collection-aware requests before looking up collection
     metadata.
   - Return a length-specific error from the high-level request path.
   - Add tests for protocol length boundaries and for preserving the request
     buffer and pipeline count after rejection.
   
   Side effects:
   
   - Performance effects: Adds constant-time length checks before request
     construction. The impact has not been benchmarked.
   
   - Breaking backward compatibility: Requests exceeding protocol length limits
     now fail instead of producing malformed frames.
   
   ---
   ### Check List:
   
   - Built `brpc_couchbase_unittest` and passed all 8 `CouchbaseUnitTest` tests.
   - Added length-boundary and oversized-request regression tests.
   - Couchbase server integration tests were not run.
   - Please follow [Contributor Covenant Code of 
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).


-- 
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