From cb3353f13d2da0eae719df016aea0789abd3727e Mon Sep 17 00:00:00 2001 From: brenosilva Date: Tue, 5 Apr 2011 00:18:37 +0000 Subject: [PATCH] Improvements in detection only --- apache2/apache2_io.c | 4 ++++ apache2/msc_reqbody.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apache2/apache2_io.c b/apache2/apache2_io.c index ef76c7d1..1f8da0de 100644 --- a/apache2/apache2_io.c +++ b/apache2/apache2_io.c @@ -240,6 +240,10 @@ apr_status_t read_request_body(modsec_rec *msr, char **error_msg) { "configured limit (%ld).", msr->txcfg->reqbody_limit); if(msr->txcfg->if_limit_action == REQUEST_BODY_LIMIT_ACTION_REJECT) return -5; + + seen_eos = 1; + + buflen = (msr->txcfg->reqbody_limit - msr->reqbody_length); } if (buflen != 0) { diff --git a/apache2/msc_reqbody.c b/apache2/msc_reqbody.c index f68f4795..e59ce35e 100644 --- a/apache2/msc_reqbody.c +++ b/apache2/msc_reqbody.c @@ -482,11 +482,6 @@ static apr_status_t modsecurity_request_body_end_raw(modsec_rec *msr, char **err } - if((msr->msc_reqbody_length >= msr->txcfg->reqbody_limit) && (msr->txcfg->if_limit_action != REQUEST_BODY_LIMIT_ACTION_REJECT)) { - msr->msc_reqbody_buffer[msr->txcfg->reqbody_limit] = '\0'; - msr->msc_reqbody_length = msr->txcfg->reqbody_limit; - } - /* Now free the memory used by the chunks. */ chunks = (msc_data_chunk **)msr->msc_reqbody_chunks->elts;