From 535212e1236ecc43129568a9d6ea049894d7d474 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 31 May 2023 11:05:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8D=87=E7=BA=A7=20openresty=20waf=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=20(#96)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/openresty/1.21.4.1/www/common/waf/access.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/openresty/1.21.4.1/www/common/waf/access.lua b/apps/openresty/1.21.4.1/www/common/waf/access.lua index c346a6c60..67040aea1 100644 --- a/apps/openresty/1.21.4.1/www/common/waf/access.lua +++ b/apps/openresty/1.21.4.1/www/common/waf/access.lua @@ -310,7 +310,12 @@ end local function postCheck() if method == "POST" then local boundary = get_boundary() - if boundary then + local fileExtDeny = optionIsOn(ngx.var.fileExtDeny) + if boundary and fileExtDeny then + local protocol = ngx.var.server_protocol + if protocol == "HTTP/2.0" then + return + end local len = string.len local sock = ngx.req.socket() if not sock then