fix: reject an empty start-after and continuation-token in ListObjects (V1)
This commit is contained in:
1 parent
613c71290f
commit
276128b42b
4 files changed
+83
-16
No files matched your search
@@ -1213,6 +1213,42 @@ func TestS3ApiController_ListObjects(t *testing.T) {
|
||||
err: s3err.GetInvalidArgumentErr(s3err.InvalidArgStartAfter, ""),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "empty start-after is not supported",
|
||||
input: testInput{
|
||||
locals: defaultLocals,
|
||||
beRes: listResult,
|
||||
queries: map[string]string{
|
||||
"start-after": "",
|
||||
},
|
||||
},
|
||||
output: testOutput{
|
||||
response: &Response{
|
||||
MetaOpts: &MetaOptions{
|
||||
BucketOwner: "root",
|
||||
},
|
||||
},
|
||||
err: s3err.GetInvalidArgumentErr(s3err.InvalidArgStartAfter, ""),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "continuation-token is not supported",
|
||||
input: testInput{
|
||||
locals: defaultLocals,
|
||||
beRes: listResult,
|
||||
queries: map[string]string{
|
||||
"continuation-token": "my-token",
|
||||
},
|
||||
},
|
||||
output: testOutput{
|
||||
response: &Response{
|
||||
MetaOpts: &MetaOptions{
|
||||
BucketOwner: "root",
|
||||
},
|
||||
},
|
||||
err: s3err.GetInvalidArgumentErr(s3err.InvalidArgContinuationToken, ""),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid max keys",
|
||||
input: testInput{
|
||||
|
||||
Reference in new issue
Block a user