Improvements in detection only

This commit is contained in:
brenosilva 2011-04-05 17:41:52 +00:00
parent b8828ad3f1
commit 9c5e0a4f98
2 changed files with 4 additions and 2 deletions

View File

@ -255,7 +255,7 @@ apr_status_t read_request_body(modsec_rec *msr, char **error_msg) {
} else {
*error_msg = apr_psprintf(msr->mp, "A Request body is larger than the "
*error_msg = apr_psprintf(msr->mp, "Request body is larger than the "
"configured limit (%ld).", msr->txcfg->reqbody_limit);
return -5;

View File

@ -742,9 +742,11 @@ static int hook_request_late(request_rec *r) {
msr_log(msr, 1, "Request body (Content-Length) is larger than the "
"configured limit (%ld).", msr->txcfg->reqbody_limit);
} else if ((msr->txcfg->is_enabled == MODSEC_DETECTION_ONLY) && (msr->txcfg->if_limit_action == REQUEST_BODY_LIMIT_ACTION_PARTIAL)){
msr_log(msr, 1, "Request body (Content-Length) is larger than the "
"configured limit (%ld).", msr->txcfg->reqbody_limit);
msr->inbound_error = 1;
} else {
msr_log(msr, 1, "A Request body (Content-Length) is larger than the "
msr_log(msr, 1, "Request body (Content-Length) is larger than the "
"configured limit (%ld).", msr->txcfg->reqbody_limit);
msr->inbound_error = 1;
}