* lib/core: Fixed wrong argument order for luci.user.checkpasswd
authorSteven Barth <steven@midlink.org>
Sat, 28 Jun 2008 21:18:28 +0000 (21:18 +0000)
committerSteven Barth <steven@midlink.org>
Sat, 28 Jun 2008 21:18:28 +0000 (21:18 +0000)
libs/core/luasrc/sys.lua

index 540a636fb864b25330e617934792823db632e07d..c5c471a75fee5bb9262cdda1e4059c806a54ed36 100644 (file)
@@ -295,7 +295,7 @@ function user.checkpasswd(username, password)
                if account.passwd == "!" then
                        return true
                else
-                       return (account.passwd == posix.crypt(account.passwd, password))
+                       return (account.passwd == posix.crypt(password, account.passwd))
                end
        end
 end