Fix login issue with special characters.

The special characters were URL encoded during HTTP request and saved in URL encoded form.
The login used the unencoded password instead, and this resulted in a password hash mismatch which prevented user login.

Now the password hash is calculated on the unencoded password.
This commit is contained in:
emanuele-f 2017-04-14 18:20:36 +02:00
parent 12e6db4efb
commit a10d6c4f7d
8 changed files with 17 additions and 12 deletions

View file

@ -31,7 +31,8 @@ if(haveAdminPrivileges()) then
end
local ret = false
if(ntop.addUser(username, full_name, password, host_role, networks, getInterfaceName(allowed_interface), host_pool_id)) then
if(ntop.addUser(username, full_name, unescapeHTML(password), host_role, networks, getInterfaceName(allowed_interface), host_pool_id)) then
ret = true
if limited_lifetime and not ntop.addUserLifetime(username, lifetime_secs) then