From 17aefa5a222c1682ed1061acda24acea9f3ba020 Mon Sep 17 00:00:00 2001 From: loveshell <82163261@qq.com> Date: Tue, 26 Mar 2013 21:44:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=AC=E4=B9=89=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- waf.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/waf.lua b/waf.lua index 16cda02..da9c82a 100644 --- a/waf.lua +++ b/waf.lua @@ -3,10 +3,10 @@ if ngx.re.match(ngx.var.request_uri,whitelist,"isjo") then elseif ngx.req.get_body_data() and ngx.re.match(ngx.req.get_body_data(),[[^(?!Content-Disposition: form-data;(.*)filename="(.*).(php|jsp|phtml|asp|aspx|cgi)").*$]],"isjo") then return else - if ngx.re.match(string.gsub(ngx.unescape_uri(ngx.var.request_uri),"%%",""),regex.."|"..get,"isjo") then + if ngx.re.match(string.gsub(ngx.unescape_uri(ngx.var.request_uri),"\\%",""),regex.."|"..get,"isjo") then log('GET',ngx.unescape_uri(ngx.var.request_uri)) check() - elseif ngx.req.get_body_data() and ngx.re.match(string.gsub(ngx.unescape_uri(ngx.req.get_body_data()),"%%",""),regex,"isjo")then + elseif ngx.req.get_body_data() and ngx.re.match(string.gsub(ngx.unescape_uri(ngx.req.get_body_data()),"\\%",""),regex,"isjo")then log('POST',ngx.unescape_uri(ngx.var.request_uri),ngx.unescape_uri(ngx.req.get_body_data())) check() -- elseif ngx.req.get_headers()["Cookie"] and ngx.re.match(ngx.unescape_uri(ngx.req.get_headers()["Cookie"]),regex,"isjo")then