Movatterモバイル変換


[0]ホーム

URL:


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

Commit661fcaa

Browse files
allanrboYanshu Zhao
authored and
Yanshu Zhao
committed
Nginx, scan all request bodies (microsoft#36)
1 parent78867ac commit661fcaa

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎nginx/modsecurity/ngx_http_modsecurity.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,19 +1038,16 @@ ngx_http_modsecurity_handler(ngx_http_request_t *r)
10381038
returnNGX_DECLINED;
10391039
}
10401040

1041-
if (r->method==NGX_HTTP_POST
1042-
&&modsecIsRequestBodyAccessEnabled(ctx->req) ) {
10431041

1044-
/* read POST request body, should we process PUT? */
1042+
if (modsecIsRequestBodyAccessEnabled(ctx->req)&& (r->headers_in.content_length||r->headers_in.chunked)) {
10451043
rc=ngx_http_read_client_request_body(r,ngx_http_modsecurity_body_handler);
10461044
if (rc >=NGX_HTTP_SPECIAL_RESPONSE) {
10471045
returnrc;
10481046
}
10491047

10501048
returnNGX_DONE;
10511049
}
1052-
1053-
/* other method */
1050+
10541051
returnngx_http_modsecurity_status(r,modsecProcessRequestBody(ctx->req));
10551052
}
10561053

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp