mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Generate an alerts for error log entries for requests we did not process *if* it has a UNIQUE_ID available.
This commit is contained in:
parent
8aeff06fc2
commit
ebdd0400dd
@ -656,6 +656,15 @@ static void hook_error_log(const char *file, int line, int level, apr_status_t s
|
||||
|
||||
if (r == NULL) return;
|
||||
msr = retrieve_tx_context(r);
|
||||
|
||||
/* Alert for failed requests we never had the chance to process */
|
||||
if (level & APLOG_ERR) {
|
||||
if (msr == NULL && apr_table_get(r->subprocess_env, "UNIQUE_ID")) {
|
||||
msr = create_tx_context(r);
|
||||
msr_log(msr, 1, "Request failed before processing could begin", 5);
|
||||
}
|
||||
}
|
||||
|
||||
if (msr == NULL) return;
|
||||
|
||||
/* Store the error message for later */
|
||||
|
Loading…
x
Reference in New Issue
Block a user