fix: reject start-after in ListObjects V1

listobjects v1 now returns InvalidArgument when the start-after query parameter is present, matching s3, which only accepts it with list-type=2. previously the parameter was silently ignored.

Fixes #2004
This commit is contained in:
dualfroz committed 2026-10-07 19:38:54 +02:00
1 parent 09e1b65724
commit b3bf48bdcb
6 files changed
+67 -3

No files matched your search

+5
View File
@@ -26,6 +26,7 @@ type InvalidArgErrorCode int
const (
InvalidArgMaxBuckets InvalidArgErrorCode = iota
InvalidArgNegativeMaxKeys
InvalidArgStartAfter
InvalidArgObjectAttributes
InvalidArgPartNumber
InvalidArgCompleteMpPartNumber
@@ -90,6 +91,10 @@ var invalidArgErrResponses = map[InvalidArgErrorCode]InvalidArgumentError{
Description: "max-keys cannot be negative",
ArgumentName: "maxKeys",
},
InvalidArgStartAfter: {
Description: "startAfter only supported in REST.GET.BUCKET with list-type=2",
ArgumentName: "start-after",
},
InvalidArgObjectAttributes: {
Description: "Invalid attribute name specified.",
ArgumentName: "x-amz-object-attributes",