mirror of
https://github.com/pgsty/minio.git
synced 2026-09-05 18:16:16 +03:00
fix: reject composite CRC64NVME completion
Remove the remaining type-only canonicalization at CompleteMultipartUpload while preserving legacy uploads stored as FULL_OBJECT. Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
@@ -1185,13 +1185,7 @@ func (er erasureObjects) CompleteMultipartUpload(ctx context.Context, bucket str
|
||||
}
|
||||
}
|
||||
if opts.wantChecksumType != "" {
|
||||
providedObjectType := opts.wantChecksumType
|
||||
// CRC64NVME is always canonicalized to FULL_OBJECT. Preserve this
|
||||
// behavior until its exact AWS wire semantics have been probed.
|
||||
if checksumType.Base().Is(hash.ChecksumCRC64NVME) {
|
||||
providedObjectType = xhttp.AmzChecksumTypeFullObject
|
||||
}
|
||||
if providedObjectType != expectedType.ObjType() {
|
||||
if opts.wantChecksumType != expectedType.ObjType() {
|
||||
return oi, completeMultipartChecksumTypeMismatch(opts.wantChecksumType, expectedType.ObjType())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user