summaryrefslogtreecommitdiffstats
path: root/lib/authenticator.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-09-26 18:16:31 +0000
committerTed Trask <ttrask01@yahoo.com>2008-09-26 18:16:31 +0000
commiteb012794028e9f5670feb03718c03ad699e8d935 (patch)
tree4a73c5a4cb7ef7b444236cca06ef04b651bb8996 /lib/authenticator.lua
parente78de1270cce57dbe3abeab1857084a4de613cdb (diff)
downloadacf-core-eb012794028e9f5670feb03718c03ad699e8d935.tar.bz2
acf-core-eb012794028e9f5670feb03718c03ad699e8d935.tar.xz
Cleanup of some libs.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1533 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/authenticator.lua')
-rw-r--r--lib/authenticator.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/authenticator.lua b/lib/authenticator.lua
index 857703c..74dfdad 100644
--- a/lib/authenticator.lua
+++ b/lib/authenticator.lua
@@ -4,7 +4,7 @@
module (..., package.seeall)
require("modelfunctions")
-require("fs")
+require("format")
-- This will be the sub-authenticator
local auth
@@ -77,7 +77,7 @@ local write_settings = function(self, settings, id)
-- Password, password_confirm, roles are allowed to not exist, just leave the same
id.userid = settings.value.userid.value
id.username = settings.value.username.value
- if settings.value.password then id.password = fs.md5sum_string(settings.value.password.value) end
+ if settings.value.password then id.password = format.md5sum_string(settings.value.password.value) end
if settings.value.roles then id.roles = table.concat(settings.value.roles.value, ",") end
return auth.write_entry(self, passwdtable, "", id.userid, (id.password or "")..":"..(id.username or "")..":"..(id.roles or ""))
@@ -130,7 +130,7 @@ authenticate = function(self, userid, password)
local id = get_id(userid)
if not id then
errtxt = "Userid not found"
- elseif id.password ~= fs.md5sum_string(password) then
+ elseif id.password ~= format.md5sum_string(password) then
errtxt = "Invalid password"
end
end