check for duplicated name in endpoint notification list

fix #3898
This commit is contained in:
gabryon99 2020-05-07 16:50:31 +02:00
parent f5afe9ecdd
commit ea1c60c99c
12 changed files with 33 additions and 17 deletions

View file

@ -21,7 +21,7 @@ local measurement = _POST["measurement"]
local rv = {}
local function reportError(msg)
print(json.encode({ error = msg, success = false, csrf = ntop.getRandomCSRFValue() }))
print(json.encode({ error = msg, success = false}))
end
local function isValidHostMeasurementCombination(host, measurement)
@ -165,5 +165,4 @@ end
-- ################################################
rv.success = true
rv.csrf = ntop.getRandomCSRFValue()
print(json.encode(rv))

View file

@ -23,7 +23,6 @@ if not haveAdminPrivileges() then
end
local result = {}
result.csrf = ntop.getRandomCSRFValue()
sendHTTPContentTypeHeader('application/json')