mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
up
This commit is contained in:
@@ -85,7 +85,7 @@ function _M.log(self, args, rule_name, reason)
|
||||
return false
|
||||
end
|
||||
stmt2:reset()
|
||||
|
||||
|
||||
local res, err = db:execute([[COMMIT]])
|
||||
-- self:D("LOG[2]:"..tostring(res)..":"..tostring(err))
|
||||
if db and db:isopen() then
|
||||
@@ -459,10 +459,22 @@ function _M.ngx_match_list(self, rules, content)
|
||||
for i,rule in ipairs(rules)
|
||||
do
|
||||
if rule[1] == 1 then
|
||||
local t = self:is_ngx_match_orgin(rule[2], content, rule[3])
|
||||
if t then
|
||||
return true
|
||||
if type(content) == "string" then
|
||||
local t = self:is_ngx_match_orgin(rule[2], content, rule[3])
|
||||
if t then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
if type(content) == "table" then
|
||||
for arg_k,arg_v in ipairs(content) do
|
||||
local t = self:is_ngx_match_orgin(rule[2], arg_v, rule[3])
|
||||
if t then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
||||
@@ -163,6 +163,8 @@ end
|
||||
|
||||
local function waf_get_args()
|
||||
if not config['get']['open'] or not C:is_site_config('get') then return false end
|
||||
|
||||
C:D(C:to_json(args_rules)..":"..json.encode(params['uri_request_args']))
|
||||
if C:ngx_match_list(args_rules, params['uri_request_args']) then
|
||||
C:write_log('args','regular')
|
||||
C:return_html(config['get']['status'], get_html)
|
||||
|
||||
Reference in New Issue
Block a user