Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4dc3fff

Browse files
committed
Fixed auditlog in case of internal redirect
1 parent c0ae166 commit 4dc3fff

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

‎src/ngx_http_modsecurity_module.c‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ ngx_http_modsecurity_process_intervention (Transaction *transaction, ngx_http_re
194194

195195
if (intervention.status != 200)
196196
{
197+
ngx_http_modsecurity_log_handler(r);
197198
if (r->header_sent)
198199
{
199200
dd("Headers are already sent. Cannot perform the redirection at this point.");
@@ -461,22 +462,6 @@ ngx_http_modsecurity_init(ngx_conf_t *cf)
461462
}
462463
*h_preaccess = ngx_http_modsecurity_pre_access_handler;
463464

464-
/**
465-
* Process the log phase.
466-
*
467-
* TODO: check if the log phase happens like it happens on Apache.
468-
* check if last phase will not hold the request.
469-
*
470-
*/
471-
h_log = ngx_array_push(&cmcf->phases[NGX_HTTP_LOG_PHASE].handlers);
472-
if (h_log == NULL)
473-
{
474-
dd("Not able to create a new NGX_HTTP_LOG_PHASE handle");
475-
return NGX_ERROR;
476-
}
477-
*h_log = ngx_http_modsecurity_log_handler;
478-
479-
480465
rc = ngx_http_modsecurity_header_filter_init();
481466
if (rc != NGX_OK) {
482467
return rc;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /