only allow decryption of etag for only sse-s3 (#17335)

This commit is contained in:
Harshavardhana
2023-06-05 13:08:51 -07:00
committed by GitHub
parent f9e07d6143
commit 75c6fc4f02
5 changed files with 12 additions and 13 deletions
+1 -1
View File
@@ -1094,7 +1094,7 @@ func (er erasureObjects) CompleteMultipartUpload(ctx context.Context, bucket str
// ensure that part ETag is canonicalized to strip off extraneous quotes
part.ETag = canonicalizeETag(part.ETag)
expETag := tryDecryptETag(objectEncryptionKey, expPart.ETag, kind != crypto.S3)
expETag := tryDecryptETag(objectEncryptionKey, expPart.ETag, kind == crypto.S3)
if expETag != part.ETag {
invp := InvalidPart{
PartNumber: part.PartNumber,