diff --git a/cmd/object-handlers.go b/cmd/object-handlers.go index e017e6777..b918f2485 100644 --- a/cmd/object-handlers.go +++ b/cmd/object-handlers.go @@ -1191,6 +1191,9 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re return } + // Sanitize the source object name similar to NewMultipart and PutObject API + srcObject = trimLeadingSlash(srcObject) + if vid != "" && vid != nullVersionID { _, err := uuid.Parse(vid) if err != nil {