Prevents unnecessary params validation

Fixes https://github.com/ntop/ntopng/issues/1818
This commit is contained in:
Simone Mainardi 2018-06-20 16:13:16 +02:00
parent a0f8e5736b
commit fe49f7d2f5
2 changed files with 27 additions and 18 deletions

View file

@ -1312,7 +1312,24 @@ end
-- #################################################################
local function clearNotAllowedParams()
local not_allowed_uris = {"/lua/info_portal.lua", "/lua/captive_portal.lua"}
if (table.len(_GET) > 0 or table.len(_POST) > 0) and _SERVER["URI"] then
for _, uri in pairs(not_allowed_uris) do
if string.ends(uri, _SERVER["URI"]) then
_GET = {}
_POST = {}
break
end
end
end
end
-- #################################################################
if(pragma_once) then
clearNotAllowedParams()
lintParams()
pragma_once = 0
end