mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
fix: legacy object should be overwritten for metadataOnly updates (#12012)
This commit is contained in:
parent
641e564b65
commit
16ce7fb70c
@ -1273,6 +1273,11 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
|
||||
// Ensure that metadata does not contain sensitive information
|
||||
crypto.RemoveSensitiveEntries(srcInfo.UserDefined)
|
||||
|
||||
// If we see legacy source, metadataOnly we have to overwrite the content.
|
||||
if srcInfo.Legacy {
|
||||
srcInfo.metadataOnly = false
|
||||
}
|
||||
|
||||
// Check if x-amz-metadata-directive or x-amz-tagging-directive was not set to REPLACE and source,
|
||||
// destination are same objects. Apply this restriction also when
|
||||
// metadataOnly is true indicating that we are not overwriting the object.
|
||||
|
Loading…
Reference in New Issue
Block a user