fix typos after basic testing
This commit is contained in:
parent
937cd10eeb
commit
5d14813be4
|
@ -13,7 +13,7 @@
|
|||
"label": "Reverse scan",
|
||||
"regex": "^(no|yes)$",
|
||||
"type": "check"
|
||||
},
|
||||
},
|
||||
"REVERSE_SCAN_PORTS": {
|
||||
"context": "multisite",
|
||||
"default": "22 80 443 3128 8000 8080",
|
||||
|
|
|
@ -34,7 +34,7 @@ function _M:access()
|
|||
return false, "can't get REVERSE_SCAN_TIMEOUT setting from datastore : " .. err, nil, nil
|
||||
end
|
||||
-- Loop on ports
|
||||
for port in value:gmatch("%S+") do
|
||||
for port in ports:gmatch("%S+") do
|
||||
-- Check if the scan is already cached
|
||||
local cached, err = self:is_in_cache(ngx.var.remote_addr .. ":" .. port)
|
||||
if cached == nil then
|
||||
|
@ -44,7 +44,7 @@ function _M:access()
|
|||
return true, "port " .. port .. " is opened for IP " .. ngx.var.remote_addr, true, utils.get_deny_status()
|
||||
elseif not cached then
|
||||
-- Do the scan
|
||||
local res, err = self:scan(ngx.var.remote_addr, tonumber(port), tonumber(timeout)
|
||||
local res, err = self:scan(ngx.var.remote_addr, tonumber(port), tonumber(timeout))
|
||||
-- Cache the result
|
||||
local ok, err = self:add_to_cache(ngx.var.remote_addr .. ":" .. port, res)
|
||||
if not ok then
|
||||
|
|
Loading…
Reference in New Issue