s3api: fix S3 Tables auth to allow auto-hashing of body (#8170)

* s3api: allow auto-hashing of request body for s3tables

* s3api: add unit test for s3tables body hashing
This commit is contained in:
Chris Lu
2026-01-30 12:02:18 -08:00
committed by GitHub
parent f1e27b8f30
commit 6a9e7360df
2 changed files with 62 additions and 1 deletions

View File

@@ -477,7 +477,7 @@ func extractV4AuthInfoFromHeader(r *http.Request) (*v4AuthInfo, s3err.ErrorCode)
}
hashedPayload := getContentSha256Cksum(r)
if signV4Values.Credential.scope.service != "s3" && signV4Values.Credential.scope.service != "s3tables" && hashedPayload == emptySHA256 && r.Body != nil {
if signV4Values.Credential.scope.service != "s3" && hashedPayload == emptySHA256 && r.Body != nil {
var hashErr error
hashedPayload, hashErr = streamHashRequestBody(r, iamRequestBodyLimit)
if hashErr != nil {