diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-11-05 22:05:11 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-11-05 22:05:11 +0000 |
commit | fcd9579fd49010cff0bda80dd9d8fda1f88c0083 (patch) | |
tree | c1c09b4fe30cd4110bbae33d6b869234ceba9122 | |
parent | 19cae040036f3e1e6b468b854efd6d4ca9228604 (diff) |
libs/sys: fix logic fail in luci.sys.user.checkpasswd() (#152)
-rw-r--r-- | libs/sys/luasrc/sys.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index 6d000ae6e..d4242a333 100644 --- a/libs/sys/luasrc/sys.lua +++ b/libs/sys/luasrc/sys.lua @@ -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 |