mirror of
https://github.com/versity/versitygw.git
synced 2026-09-25 17:34:29 +00:00
* fix: reject DeleteObjects requests with more than 1000 keys A DeleteObjects request may name at most 1000 keys; S3 rejects anything larger with 400 InvalidRequest. The handler parsed the body and passed every key through authorization and on to the backend, so a 1001-key request was processed instead of being refused. Check the count right after the body is parsed, before authorization and before anything reaches the backend, so an over-limit batch can't be applied partially. Exactly 1000 keys still succeed, and an empty delete list keeps its current behavior (200 with an empty result). Fixes #2196 * fix: return MalformedXML for an oversized DeleteObjects request A DeleteObjects request naming more than 1000 keys is answered with MalformedXML, not InvalidRequest. Update the check and the unit and integration expectations. --------- Co-authored-by: Tung Lam <lamphamabtung96@gmail.com>