Handles allowed interfaces with ids to prevent issues with special chars

This commit is contained in:
Simone Mainardi 2016-07-14 16:41:42 +02:00
parent 03897ecc2e
commit 62e8ee0be7
4 changed files with 9 additions and 6 deletions

View file

@ -27,7 +27,7 @@ if(haveAdminPrivileges()) then
return
end
if(ntop.addUser(username, full_name, password, host_role, networks, allowed_interface)) then
if(ntop.addUser(username, full_name, password, host_role, networks, getInterfaceName(allowed_interface))) then
print ("{ \"result\" : 0, \"message\" : \"User added successfully\" }")
else
print ("{ \"result\" : -1, \"message\" : \"Error while adding new user\" }")