From 35506601636340f67e713cf7ad012b61cd086a94 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Thu, 26 May 2016 00:41:26 +0530 Subject: [PATCH] Return error for empty parts in multipartupload complete (#1758) --- object-handlers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/object-handlers.go b/object-handlers.go index 9d60a56d1..b67fc2b2f 100644 --- a/object-handlers.go +++ b/object-handlers.go @@ -941,6 +941,10 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite writeErrorResponse(w, r, ErrMalformedXML, r.URL.Path) return } + if len(complMultipartUpload.Parts) == 0 { + writeErrorResponse(w, r, ErrMalformedXML, r.URL.Path) + return + } if !sort.IsSorted(completedParts(complMultipartUpload.Parts)) { writeErrorResponse(w, r, ErrInvalidPartOrder, r.URL.Path) return