mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(s3): return every bucket when ListBuckets has no max-buckets (#7886)
Paging ListBuckets capped a request without max-buckets at 10000 buckets with a continuation token, so a caller that reads only the first response, like the Floci UI, lost every bucket after that. Without max-buckets, return the whole list on one page again.
This commit is contained in:
1 parent
6565225234
commit
14c3004240
3 files changed
+18
-2
No files matched your search
@@ -630,7 +630,7 @@ public class S3Service implements Resettable, ResourceProvider {
|
||||
"max-buckets must be between 1 and " + MAX_LIST_BUCKETS + ".", 400);
|
||||
}
|
||||
return Pagination.paginate(listBuckets(), Bucket::getName,
|
||||
maxBuckets == null ? MAX_LIST_BUCKETS : maxBuckets, continuationToken,
|
||||
maxBuckets == null ? Integer.MAX_VALUE : maxBuckets, continuationToken,
|
||||
"buckets:" + ownerId(),
|
||||
token -> new AwsException("InvalidArgument", "The continuation token provided is incorrect.", 400));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user