mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
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:
@@ -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 "
|
||||
|
Reference in New Issue
Block a user