From 207bd155a529fd11083d1d2dd48647debc97444e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 30 Sep 2015 22:15:05 +0200 Subject: including host in aliases --- mod_auth_custom/mod_auth_custom.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod_auth_custom/mod_auth_custom.lua b/mod_auth_custom/mod_auth_custom.lua index 59d5236..424e3ab 100644 --- a/mod_auth_custom/mod_auth_custom.lua +++ b/mod_auth_custom/mod_auth_custom.lua @@ -23,7 +23,7 @@ function is_alias(username) while true do local line = f:read("*line"); if line == nil then break; end - if string.lower(line) == string.lower(username) then found = true; end + if string.lower(line) == string.lower(username .. "@" .. module.host) then found = true; end end f:close(); return found; @@ -33,7 +33,7 @@ function alias_pw(username) local f = assert(io.open(alias_secret_file, "r")); local secret = f:read("*all"); f:close(); - return sha2.sha512hex(username .. secret); + return sha2.sha512hex(username .. "@" .. module.host .. secret); end function user_exists(username) -- cgit v1.2.3