fix: reject composite CRC64NVME checksums

Return InvalidArgument for CRC64NVME with COMPOSITE at multipart initiation and PutObject instead of silently canonicalizing the request to FULL_OBJECT.

Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
Feng Ruohang
2026-08-29 17:23:41 +08:00
parent 7c103389f5
commit d28885d0e5
4 changed files with 81 additions and 11 deletions
+3
View File
@@ -67,6 +67,9 @@ func TestGetContentChecksumRejectsUnsupportedHeaders(t *testing.T) {
// TestChecksumAddToHeader tests that adding and retrieving a checksum on a header works
func TestChecksumAddToHeader(t *testing.T) {
if got := NewChecksumType("CRC64NVME", xhttp.AmzChecksumTypeComposite); !got.Is(ChecksumInvalid) {
t.Fatalf("CRC64NVME/COMPOSITE = %s, want invalid", got.StringFull())
}
tests := []struct {
name string
checksum ChecksumType