* 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 540a636..c5c471a 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