fix: reject ListMultipartUploads requests that also carry uploadId
A bucket GET with both the uploads and uploadId query parameters was routed to ListMultipartUploads and answered with the upload listing. S3 rejects the combination with 400 InvalidArgument, "Conflicting query string parameters: uploadId, uploads". Add an error route for the combination ahead of ListMultipartUploads, the way the object level '?uploads' request is rejected, and enable the REST test that covers it. Fixes #2155
This commit is contained in:
1 parent
6704314fea
commit
5f0e2e55ba
5 files changed
+37
-3
No files matched your search
@@ -725,6 +725,11 @@ func (sa *S3ApiRouter) Init() {
|
||||
middlewares.VerifyV4Signature(sa.root, sa.iam, sa.region, false, false, false),
|
||||
middlewares.ParseAcl(sa.be),
|
||||
))
|
||||
// bucket operation with both '?uploads' and '?uploadId' is rejected
|
||||
bucketRouter.Get("",
|
||||
middlewares.MatchQueryArgs("uploads", "uploadId"),
|
||||
controllers.ProcessHandlers(ctrl.HandleErrorRoute(s3err.GetInvalidArgumentErr(s3err.InvalidArgUploadIdWithUploads, "uploadId")), metrics.ActionUndetected, services),
|
||||
)
|
||||
bucketRouter.Get("",
|
||||
middlewares.MatchQueryArgs("uploads"),
|
||||
controllers.ProcessHandlers(
|
||||
|
||||
Reference in new issue
Block a user