mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 16:30:10 +00:00
Fixes validation of nEdge routing policies
This commit is contained in:
parent
cef4e57641
commit
bf7a5c2776
1 changed files with 9 additions and 11 deletions
|
|
@ -1932,20 +1932,18 @@ end
|
|||
|
||||
local function validateSpecialParameter(param, value)
|
||||
-- These parameters are made up of one string prefix plus a string suffix
|
||||
|
||||
for k, v in pairs(special_parameters) do
|
||||
if starts(param, k) then
|
||||
local suffix = split(param, k)[2]
|
||||
|
||||
if starts(param, k) and not known_parameters[param] --[[ make sure this is not a known, non-special param --]] then
|
||||
local suffix = split(param, k)[2]
|
||||
value = ntop.httpPurifyParam(value)
|
||||
|
||||
if not v[1](suffix) then
|
||||
return false, "Special Validation, parameter key"
|
||||
elseif not v[2](value) then
|
||||
return false, "Special Validation, parameter value"
|
||||
else
|
||||
return true
|
||||
end
|
||||
if not v[1](suffix) then
|
||||
return false, "Special Validation, parameter key"
|
||||
elseif not v[2](value) then
|
||||
return false, "Special Validation, parameter value"
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue