mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Prevents unnecessary params validation
Fixes https://github.com/ntop/ntopng/issues/1818
This commit is contained in:
parent
a0f8e5736b
commit
fe49f7d2f5
2 changed files with 27 additions and 18 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue