From 7ec231373fcb0fb4448053ad4ea0c8d656b2cc4e Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 3 Dec 2008 22:08:49 +0500 Subject: Fix for handling latin1 encoded hostnames in SASL --- plugins/mod_saslauth.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 7cb93c46..52ef68c7 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -64,14 +64,14 @@ local function handle_status(session, status) end end -local function password_callback(node, host, mechanism) +local function password_callback(node, host, mechanism, raw_host) local password = (datamanager.load(node, host, "accounts") or {}).password; -- FIXME handle hashed passwords local func = function(x) return x; end; if password then if mechanism == "PLAIN" then return func, password; elseif mechanism == "DIGEST-MD5" then - return func, md5(node..":"..host..":"..password); + return func, md5(node..":"..raw_host..":"..password); end end return func, nil; -- cgit v1.2.3