X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fsys%2Fluasrc%2Fsys.lua;h=d4242a3331f88680991b84f4ea954de6cb70d49b;hp=6d000ae6e279bfba91846f58c526bb1bed87bdc1;hb=fcd9579fd49010cff0bda80dd9d8fda1f88c0083;hpb=19cae040036f3e1e6b468b854efd6d4ca9228604;ds=sidebyside 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