Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/ngx_http_modsecurity_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ ngx_http_modsecurity_process_intervention (Transaction *transaction, ngx_http_re

ngx_table_elt_t *location = NULL;
location = ngx_list_push(&r->headers_out.headers);
if (location == NULL) {
free(intervention.url);
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
ngx_str_set(&location->key, "Location");
location->value = a;
r->headers_out.location = location;
Expand All @@ -217,6 +221,8 @@ ngx_http_modsecurity_process_intervention (Transaction *transaction, ngx_http_re
ngx_http_modsecurity_store_ctx_header(r, &location->key, &location->value);
#endif

free(intervention.url);
intervention.url = NULL;
Comment on lines +224 to +225
return intervention.status;
}

Expand Down
Loading