fix match

pull/47/head
loveshell 2015-04-19 12:25:06 +08:00
parent ee40966545
commit ee2e656e5a
1 changed files with 4 additions and 2 deletions

View File

@ -93,11 +93,13 @@ 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
if items[ext] then 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) log('POST',ngx.var.request_uri,"-","file attack with ext "..ext)
say_html() say_html()
end end
end end
end
return false return false
end end
function Set (list) function Set (list)