mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Use POST requests when required
This commit is contained in:
parent
910fdcdc4a
commit
397d525d85
25 changed files with 282 additions and 451 deletions
|
|
@ -8,11 +8,10 @@ require "lua_utils"
|
|||
|
||||
sendHTTPHeader('text/html; charset=iso-8859-1')
|
||||
|
||||
if(_GET["csrf"] ~= nil) then
|
||||
username = _GET["username"]
|
||||
old_password = _GET["old_password"]
|
||||
new_password = _GET["new_password"]
|
||||
confirm_new_password = _GET["confirm_new_password"]
|
||||
username = _POST["username"]
|
||||
old_password = _POST["old_password"]
|
||||
new_password = _POST["new_password"]
|
||||
confirm_new_password = _POST["confirm_new_password"]
|
||||
|
||||
user_group = ntop.getUserGroup()
|
||||
if(user_group == "administrator") then
|
||||
|
|
@ -37,4 +36,3 @@ if(ntop.resetUserPassword(_SESSION["user"], username, old_password, new_password
|
|||
else
|
||||
print ("{ \"result\" : -1, \"message\" : \"Unable to set the new user password: perhaps the old password was invalid ?\" }")
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue