projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19cae04
)
libs/sys: fix logic fail in luci.sys.user.checkpasswd() (#152)
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 5 Nov 2010 22:05:11 +0000
(22:05 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 5 Nov 2010 22:05:11 +0000
(22:05 +0000)
libs/sys/luasrc/sys.lua
patch
|
blob
|
history
diff --git
a/libs/sys/luasrc/sys.lua
b/libs/sys/luasrc/sys.lua
index 6d000ae6e279bfba91846f58c526bb1bed87bdc1..d4242a3331f88680991b84f4ea954de6cb70d49b 100644
(file)
--- 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