mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Do not try to intercept a request after a failed rule. (See #53)
This commit is contained in:
parent
dfde8169e6
commit
2733cc739a
4
CHANGES
4
CHANGES
@ -2,6 +2,10 @@
|
||||
?? ??? 2007 - 2.2.0-trunk
|
||||
-------------------------
|
||||
|
||||
* Do not try to intercept a request after a failed rule. This fixes the
|
||||
issue associated with an "Internal Error: Asked to intercept request
|
||||
but was_intercepted is zero" error message.
|
||||
|
||||
* Removed extraneous exported symbols.
|
||||
|
||||
* Merged the PDF XSS protection functionality into ModSecurity.
|
||||
|
@ -531,7 +531,7 @@ static int hook_request_early(request_rec *r) {
|
||||
|
||||
/* Process phase REQUEST_HEADERS */
|
||||
rc = DECLINED;
|
||||
if (modsecurity_process_phase(msr, PHASE_REQUEST_HEADERS)) {
|
||||
if (modsecurity_process_phase(msr, PHASE_REQUEST_HEADERS) > 0) {
|
||||
rc = perform_interception(msr);
|
||||
}
|
||||
|
||||
@ -649,7 +649,7 @@ static int hook_request_late(request_rec *r) {
|
||||
record_time_checkpoint(msr, 1);
|
||||
|
||||
rc = DECLINED;
|
||||
if (modsecurity_process_phase(msr, PHASE_REQUEST_BODY)) {
|
||||
if (modsecurity_process_phase(msr, PHASE_REQUEST_BODY) > 0) {
|
||||
rc = perform_interception(msr);
|
||||
}
|
||||
|
||||
|
@ -639,7 +639,7 @@ apr_status_t msre_ruleset_process_phase(msre_ruleset *ruleset, modsec_rec *msr)
|
||||
arr = ruleset->phase_logging;
|
||||
break;
|
||||
default :
|
||||
/* ENH Log a warning message here. */
|
||||
msr_log(msr, 1, "Internal Error: Invalid phase %d", msr->phase);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -777,8 +777,12 @@ apr_status_t msre_ruleset_process_phase(msre_ruleset *ruleset, modsec_rec *msr)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (rc < 0) {
|
||||
msr_log(msr, 1, "Rule processing failed.");
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
msr_log(msr, 1, "Unknown rule processing return code: %i.", rc);
|
||||
msr_log(msr, 1, "Rule processing failed with unknown return code: %i.", rc);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user