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,9 +93,11 @@ function fileExtCheck(ext)
local items = Set(black_fileExt)
ext=string.lower(ext)
if ext then
if items[ext] then
log('POST',ngx.var.request_uri,"-","file attack with ext "..ext)
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()
end
end
end
return false