Changeset 6390

Show
Ignore:
Timestamp:
11/06/10 00:05:11 (3 years ago)
Author:
jow
Message:

libs/sys: fix logic fail in luci.sys.user.checkpasswd() (#152)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/libs/sys/luasrc/sys.lua

    r6315 r6390  
    605605function user.checkpasswd(username, pass) 
    606606    local pwh = user.getpasswd(username) 
    607     if not pwh or nixio.crypt(pass, pwh) ~= pwh then 
     607    if pwh and nixio.crypt(pass, pwh) ~= pwh then 
    608608        return false 
    609609    else