Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ logpath = logdir
rulepath = RulePath
UrlDeny = optionIsOn(UrlDeny)
PostCheck = optionIsOn(postMatch)
CookieCheck = optionIsOn(cookieMatch)
CookieCheck = optionIsOn(CookieMatch)
WhiteCheck = optionIsOn(whiteModule)
PathInfoFix = optionIsOn(PathInfoFix)
attacklog = optionIsOn(attacklog)
Expand Down Expand Up @@ -78,7 +78,7 @@ function whiteurl()
if WhiteCheck then
if wturlrules ~=nil then
for _,rule in pairs(wturlrules) do
if ngxmatch(ngx.var.uri,rule,"isjo") then
if ngxmatch(ngx.var.request_uri,rule,"isjo") then
return true
end
end
Expand Down
2 changes: 1 addition & 1 deletion waf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ elseif PostCheck then
return true
end
size = size + len(data)
local m = ngxmatch(data,[[Content-Disposition: form-data;(.+)filename="(.+)\\.(.*)"]],'ijo')
local m = ngx.re.match(data,[[Content-Disposition: form-data;(.+)filename="(.+)\.(\w+)"]],'isjo')
if m then
fileExtCheck(m[3])
filetranslate = true
Expand Down