Chung-En Lee created HDDS-17055:
-----------------------------------

             Summary: S3G should reject malformed x-amz-content-sha256 before 
writing the body
                 Key: HDDS-17055
                 URL: https://issues.apache.org/jira/browse/HDDS-17055
             Project: Apache Ozone
          Issue Type: Improvement
            Reporter: Chung-En Lee


Currently, if a client provides a malformed {{x-amz-content-sha256}} header, 
S3G still streams and writes the entire request body before finally failing 
with `{{{}XAmzContentSHA256Mismatch`{}}}. Since a malformed value can never 
match a valid SHA-256 hash, writing the payload is unnecessary and wastes I/O 
and network bandwidth.

*Proposed fix:* Validate the `{{{}x-amz-content-sha256`{}}} header before 
writing the body, and reject values that are not 64 hex characters immediately 
with {{{}InvalidArgument{}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to