Skip to content

Commit

Permalink
fix match
Browse files Browse the repository at this point in the history
  • Loading branch information
loveshell committed Apr 19, 2015
1 parent ee40966 commit ee2e656
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee2e656

Please sign in to comment.