libs/sys: fix logic fail in luci.sys.user.checkpasswd() (#152)
This commit is contained in:
parent
19cae04003
commit
fcd9579fd4
1 changed files with 1 additions and 1 deletions
|
@ -604,7 +604,7 @@ end
|
|||
-- @return Boolean indicating wheather the passwords are equal
|
||||
function user.checkpasswd(username, pass)
|
||||
local pwh = user.getpasswd(username)
|
||||
if not pwh or nixio.crypt(pass, pwh) ~= pwh then
|
||||
if pwh and nixio.crypt(pass, pwh) ~= pwh then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
|
|
Loading…
Reference in a new issue