summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-21 17:02:30 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-21 17:02:30 +0200
commitcb3ca4eac2a3bf2f589584278c1776db2da3a3f6 (patch)
treecef26e163e032283caafa139eff0279f319e60fa
parent822d502c0bcd9f536356d9922f6886dbe3210ecf (diff)
downloadprosody_auth-cb3ca4eac2a3bf2f589584278c1776db2da3a3f6.tar
prosody_auth-cb3ca4eac2a3bf2f589584278c1776db2da3a3f6.tar.gz
prosody_auth-cb3ca4eac2a3bf2f589584278c1776db2da3a3f6.tar.bz2
prosody_auth-cb3ca4eac2a3bf2f589584278c1776db2da3a3f6.tar.xz
prosody_auth-cb3ca4eac2a3bf2f589584278c1776db2da3a3f6.zip
log secrets
-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)