summaryrefslogtreecommitdiff
path: root/mod_auth_custom/mod_auth_custom.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mod_auth_custom/mod_auth_custom.lua')
-rw-r--r--mod_auth_custom/mod_auth_custom.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/mod_auth_custom/mod_auth_custom.lua b/mod_auth_custom/mod_auth_custom.lua
index 9ed34c3..2ac5531 100644
--- a/mod_auth_custom/mod_auth_custom.lua
+++ b/mod_auth_custom/mod_auth_custom.lua
@@ -34,7 +34,9 @@ function alias_pw(username)
34 local f = assert(io.open(alias_secret_file, "r")); 34 local f = assert(io.open(alias_secret_file, "r"));
35 local secret = f:read("*all"); 35 local secret = f:read("*all");
36 f:close(); 36 f:close();
37 return sha2.sha512hex(username .. "@" .. module.host .. secret); 37 local auth = sha2.sha512hex(username .. "@" .. module.host .. secret);
38 module:log("debug", "Expecting ā€˜%sā€™ as auth-secret for %s", auth, username .. "@" .. module.host);
39 return auth;
38end 40end
39 41
40function user_exists(username) 42function user_exists(username)