diff options
| -rw-r--r-- | mod_auth_custom/mod_auth_custom.lua | 4 | 
1 files 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) | |||
| 23 | while true do | 23 | while true do | 
| 24 | local line = f:read("*line"); | 24 | local line = f:read("*line"); | 
| 25 | if line == nil then break; end | 25 | if line == nil then break; end | 
| 26 | if string.lower(line) == string.lower(username) then found = true; end | 26 | if string.lower(line) == string.lower(username .. "@" .. module.host) then found = true; end | 
| 27 | end | 27 | end | 
| 28 | f:close(); | 28 | f:close(); | 
| 29 | return found; | 29 | return found; | 
| @@ -33,7 +33,7 @@ function alias_pw(username) | |||
| 33 | local f = assert(io.open(alias_secret_file, "r")); | 33 | local f = assert(io.open(alias_secret_file, "r")); | 
| 34 | local secret = f:read("*all"); | 34 | local secret = f:read("*all"); | 
| 35 | f:close(); | 35 | f:close(); | 
| 36 | return sha2.sha512hex(username .. secret); | 36 | return sha2.sha512hex(username .. "@" .. module.host .. secret); | 
| 37 | end | 37 | end | 
| 38 | 38 | ||
| 39 | function user_exists(username) | 39 | function user_exists(username) | 
