Skip to content

Commit ee2e656

Browse files
committed
fix match
1 parent ee40966 commit ee2e656

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

init.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ function fileExtCheck(ext)
9393
local items = Set(black_fileExt)
9494
ext=string.lower(ext)
9595
if ext then
96-
if items[ext] then
97-
log('POST',ngx.var.request_uri,"-","file attack with ext "..ext)
96+
for rule in pairs(items) do
97+
if ngx.re.match(ext,rule,"isjo") then
98+
log('POST',ngx.var.request_uri,"-","file attack with ext "..ext)
9899
say_html()
100+
end
99101
end
100102
end
101103
return false

0 commit comments

Comments
 (0)