Improvements in detection only

This commit is contained in:
brenosilva
2011-04-04 21:02:13 +00:00
parent 0f5b0debea
commit 50205ebf62
2 changed files with 11 additions and 7 deletions

View File

@@ -238,6 +238,7 @@ apr_status_t read_request_body(modsec_rec *msr, char **error_msg) {
if (msr->reqbody_length + buflen > (apr_size_t)msr->txcfg->reqbody_limit) {
*error_msg = apr_psprintf(msr->mp, "Request body is larger than the "
"configured limit (%ld).", msr->txcfg->reqbody_limit);
if(msr->txcfg->if_limit_action == REQUEST_BODY_LIMIT_ACTION_REJECT)
return -5;
}
@@ -247,9 +248,11 @@ apr_status_t read_request_body(modsec_rec *msr, char **error_msg) {
if (rcbs == -5) {
*error_msg = apr_psprintf(msr->mp, "Request body no files data length is larger than the "
"configured limit (%ld).", msr->txcfg->reqbody_no_files_limit);
if(msr->txcfg->if_limit_action == REQUEST_BODY_LIMIT_ACTION_REJECT)
return -5;
}
if(msr->txcfg->if_limit_action == REQUEST_BODY_LIMIT_ACTION_REJECT)
return -1;
}

View File

@@ -361,6 +361,7 @@ apr_status_t modsecurity_request_body_store(modsec_rec *msr,
/* Check that we are not over the request body no files limit. */
if (msr->msc_reqbody_no_files_length >= (unsigned long) msr->txcfg->reqbody_no_files_limit) {
if(msr->txcfg->if_limit_action == REQUEST_BODY_LIMIT_ACTION_REJECT)
return -5;
}