mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
MODSEC-181
This commit is contained in:
parent
c4100a1848
commit
74666fe2ca
@ -203,6 +203,9 @@ apr_status_t read_request_body(modsec_rec *msr, char **error_msg) {
|
|||||||
* too large and APR_EGENERAL when the client disconnects.
|
* too large and APR_EGENERAL when the client disconnects.
|
||||||
*/
|
*/
|
||||||
switch(rc) {
|
switch(rc) {
|
||||||
|
case APR_EOF :
|
||||||
|
*error_msg = apr_psprintf(msr->mp, "Error reading request body: %s", get_apr_error(msr->mp, rc));
|
||||||
|
return -6;
|
||||||
case APR_TIMEUP :
|
case APR_TIMEUP :
|
||||||
*error_msg = apr_psprintf(msr->mp, "Error reading request body: %s", get_apr_error(msr->mp, rc));
|
*error_msg = apr_psprintf(msr->mp, "Error reading request body: %s", get_apr_error(msr->mp, rc));
|
||||||
return -4;
|
return -4;
|
||||||
|
@ -775,6 +775,13 @@ static int hook_request_late(request_rec *r) {
|
|||||||
return HTTP_REQUEST_ENTITY_TOO_LARGE;
|
return HTTP_REQUEST_ENTITY_TOO_LARGE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case -6 : /* EOF when reading request body. */
|
||||||
|
if (my_error_msg != NULL) {
|
||||||
|
msr_log(msr, 4, "%s", my_error_msg);
|
||||||
|
}
|
||||||
|
r->connection->keepalive = AP_CONN_CLOSE;
|
||||||
|
return HTTP_BAD_REQUEST;
|
||||||
|
break;
|
||||||
default :
|
default :
|
||||||
/* allow through */
|
/* allow through */
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user