mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Cleanup unnecessary CSRF tokens passed
This commit is contained in:
parent
53e276e283
commit
af842e4aa6
17 changed files with 7 additions and 36 deletions
|
|
@ -55,8 +55,6 @@ elseif(action == "rename") then
|
|||
|
||||
if not success then
|
||||
result.error = err
|
||||
-- Can be used to trigger a new request
|
||||
result.csrf = ntop.getRandomCSRFValue()
|
||||
end
|
||||
elseif(action == "clone") then
|
||||
local new_name = _POST["confset_name"]
|
||||
|
|
@ -71,8 +69,6 @@ elseif(action == "clone") then
|
|||
|
||||
if not success then
|
||||
result.error = err
|
||||
-- Can be used to trigger a new request
|
||||
result.csrf = ntop.getRandomCSRFValue()
|
||||
else
|
||||
result.config_id = err
|
||||
end
|
||||
|
|
@ -99,15 +95,11 @@ elseif(action == "set_targets") then
|
|||
|
||||
if not success then
|
||||
result.error = err
|
||||
result.csrf = ntop.getRandomCSRFValue()
|
||||
end
|
||||
else
|
||||
-- Validation error
|
||||
result.success = false
|
||||
result.error = err
|
||||
|
||||
-- Can be used to trigger a new request
|
||||
result.csrf = ntop.getRandomCSRFValue()
|
||||
end
|
||||
else
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, "Unknown action '".. action .. "'")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue