fix: reject composite CRC64NVME trailers

Apply the full-object-only rule to declared streaming checksum trailers and cover the HTTP mutation path.

Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
Feng Ruohang
2026-08-29 18:15:51 +08:00
parent d28885d0e5
commit d4c8da162b
3 changed files with 33 additions and 1 deletions
+5 -1
View File
@@ -716,7 +716,11 @@ func GetContentChecksum(h http.Header) (*Checksum, error) {
return nil, ErrInvalidChecksum
}
res.Type |= ChecksumFullObject
case xhttp.AmzChecksumTypeComposite, "":
case xhttp.AmzChecksumTypeComposite:
if res.Type.Base().Is(ChecksumCRC64NVME) {
return nil, ErrInvalidChecksum
}
case "":
default:
return nil, ErrInvalidChecksum
}