Merge b7439093ff
into 314a2f62ec
commit
8a5239cc47
2
init.lua
2
init.lua
|
@ -90,7 +90,7 @@ function fileExtCheck(ext)
|
|||
local items = Set(black_fileExt)
|
||||
ext=string.lower(ext)
|
||||
if ext then
|
||||
for rule in pairs(items) do
|
||||
for rule,_ in pairs(items) do
|
||||
if ngx.re.match(ext,rule,"isjo") then
|
||||
log('POST',ngx.var.request_uri,"-","file attack with ext "..ext)
|
||||
say_html()
|
||||
|
|
2
waf.lua
2
waf.lua
|
@ -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 = ngxmatch(data,[[Content-Disposition: form-data;(.+)filename="(.+)\.(.*)"]],'ijo')
|
||||
if m then
|
||||
fileExtCheck(m[3])
|
||||
filetranslate = true
|
||||
|
|
Loading…
Reference in New Issue