Added ability to use ctl:requestBodyAccess=off in phase:1 to avoid limit check.

Added regression tests for this as well.
This commit is contained in:
brectanus
2008-09-10 19:45:13 +00:00
parent c5e258f0ba
commit 67c48bfdfb
2 changed files with 224 additions and 1 deletions

View File

@@ -577,7 +577,10 @@ static int hook_request_early(request_rec *r) {
rc = perform_interception(msr);
}
if ((msr->txcfg->is_enabled != MODSEC_DISABLED) && (rc == DECLINED)) {
if ( (msr->txcfg->is_enabled != MODSEC_DISABLED)
&& (msr->txcfg->reqbody_access == 1)
&& (rc == DECLINED))
{
/* Check request body limit (non-chunked requests only). */
if (msr->request_content_length > msr->txcfg->reqbody_limit) {
msr_log(msr, 1, "Request body (Content-Length) is larger than the "