Skip to content

Commit

Permalink
Enforce limit when deleting multiple objects
Browse files Browse the repository at this point in the history
Found via s3-tests.
  • Loading branch information
gaul committed Sep 3, 2024
1 parent 96da766 commit 3d2beb3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/gaul/s3proxy/S3ProxyHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,10 @@ private void handleMultiBlobRemove(HttpServletRequest request,
throw new S3Exception(S3ErrorCode.MALFORMED_X_M_L);
}

if (dmor.objects.size() > 1_000) {
throw new S3Exception(S3ErrorCode.INVALID_ARGUMENT);
}

Collection<String> blobNames = new ArrayList<>();
for (DeleteMultipleObjectsRequest.S3Object s3Object :
dmor.objects) {
Expand Down

0 comments on commit 3d2beb3

Please sign in to comment.