mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Add back code to send an alert on request failure.
This commit is contained in:
parent
656021c20e
commit
e251a9bd57
@ -695,6 +695,16 @@ static void hook_error_log(const char *file, int line, int level, apr_status_t s
|
|||||||
|
|
||||||
if (r == NULL) return;
|
if (r == NULL) return;
|
||||||
msr = retrieve_tx_context(r);
|
msr = retrieve_tx_context(r);
|
||||||
|
|
||||||
|
/* Alert for failed requests we never had the chance to process */
|
||||||
|
/* TODO: This needs more testing */
|
||||||
|
if (level & APLOG_ERR) {
|
||||||
|
if (msr == NULL && apr_table_get(r->subprocess_env, "UNIQUE_ID")) {
|
||||||
|
msr = create_tx_context((request_rec *)r);
|
||||||
|
msr_log(msr, 1, "Request failed before processing could begin");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (msr == NULL) return;
|
if (msr == NULL) return;
|
||||||
|
|
||||||
/* Store the error message for later */
|
/* Store the error message for later */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user