Skip to content

Commit b3418be

Browse files
committed
Merge pull request #35 from chaizhenhua/remotes/trunk
Fixed Action Drop not work
2 parents ae0bee0 + 65d8896 commit b3418be

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

nginx/modsecurity/ngx_http_modsecurity.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,9 @@ ngx_http_modsecurity_create_ctx(ngx_http_request_t *r)
668668
if (ctx->brigade == NULL) {
669669
return NULL;
670670
}
671+
672+
apr_table_setn(ctx->req->notes, NOTE_NGINX_REQUEST_CTX, (const char *) ctx);
673+
671674
return ctx;
672675
}
673676

standalone/api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,10 @@ int modsecProcessRequestBody(request_rec *r) {
472472

473473
ap_remove_input_filter(f);
474474

475+
if (status != DECLINED) {
476+
return status;
477+
}
478+
475479
hookfn_insert_filter(r);
476480

477481
/* Find the transaction context first. */

0 commit comments

Comments
 (0)