mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
Always get the actual object size (#14637)
In bulk ETag decryption, do not rely on the etag to check if it is encrypted or not to decide if we should set the actual object size in ObjectInfo. The reason is that multipart objects ETags are not encrypted. Always get the actual object size in that case.
This commit is contained in:
parent
ecfae074dc
commit
908eb57795
@ -163,6 +163,8 @@ func DecryptETags(ctx context.Context, KMS kms.KMS, objects []ObjectInfo, batchS
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
objects[i].Size = size
|
||||
|
||||
ETag, err := etag.Parse(objects[i].ETag)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -173,7 +175,6 @@ func DecryptETags(ctx context.Context, KMS kms.KMS, objects []ObjectInfo, batchS
|
||||
return err
|
||||
}
|
||||
ETag = etag.ETag(tag)
|
||||
objects[i].Size = size
|
||||
objects[i].ETag = ETag.String()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user