[ 
https://issues.apache.org/jira/browse/HDDS-17055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Huang reassigned HDDS-17055:
---------------------------------

    Assignee: Andy Huang

> 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: Sub-task
>            Reporter: Chung-En Lee
>            Assignee: Andy Huang
>            Priority: Major
>
> 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