mirror of
https://github.com/minio/minio.git
synced 2025-02-26 21:09:15 -05:00
fix: fail large content in DeleteMultipleObjects() early (#17321)
This commit is contained in:
parent
b8474295af
commit
14f6ac9222
@ -439,6 +439,11 @@ func (api objectAPIHandlers) DeleteMultipleObjectsHandler(w http.ResponseWriter,
|
||||
// The max. XML contains 100000 object names (each at most 1024 bytes long) + XML overhead
|
||||
const maxBodySize = 2 * 100000 * 1024
|
||||
|
||||
if r.ContentLength > maxBodySize {
|
||||
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrEntityTooLarge), r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
// Unmarshal list of keys to be deleted.
|
||||
deleteObjectsReq := &DeleteObjectsRequest{}
|
||||
if err := xmlDecoder(r.Body, deleteObjectsReq, maxBodySize); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user