From 402f942d54084fa537ca7b00cafe4a3077f694b7 Mon Sep 17 00:00:00 2001 From: Jonathan Berrewaerts Date: Wed, 18 Mar 2026 16:06:19 +0100 Subject: [PATCH] Return 400 in case of parsing error --- apache2/apache2_io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apache2/apache2_io.c b/apache2/apache2_io.c index 8deeb01c9..33788ab53 100644 --- a/apache2/apache2_io.c +++ b/apache2/apache2_io.c @@ -354,6 +354,9 @@ apr_status_t read_request_body(modsec_rec *msr, char **error_msg) { if (rcbe == -5) { return HTTP_REQUEST_ENTITY_TOO_LARGE; } + if (rcbe == -2) { + return HTTP_BAD_REQUEST; + } if (rcbe < 0) { return HTTP_INTERNAL_SERVER_ERROR; }