pull/71/merge
xingdai315 2016-04-16 17:42:53 +00:00
commit 8a5239cc47
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ function fileExtCheck(ext)
local items = Set(black_fileExt) local items = Set(black_fileExt)
ext=string.lower(ext) ext=string.lower(ext)
if ext then if ext then
for rule in pairs(items) do for rule,_ in pairs(items) do
if ngx.re.match(ext,rule,"isjo") then if ngx.re.match(ext,rule,"isjo") then
log('POST',ngx.var.request_uri,"-","file attack with ext "..ext) log('POST',ngx.var.request_uri,"-","file attack with ext "..ext)
say_html() say_html()

View File

@ -42,7 +42,7 @@ elseif PostCheck then
return true return true
end end
size = size + len(data) 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 if m then
fileExtCheck(m[3]) fileExtCheck(m[3])
filetranslate = true filetranslate = true