Enforce limit when deleting multiple objects

Found via s3-tests.
pull/685/head
Andrew Gaul 2024-09-03 23:22:57 +02:00
rodzic 96da766e0b
commit 3d2beb3319
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -1589,6 +1589,10 @@ public class S3ProxyHandler {
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) {