aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-12-08 00:18:01 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-12-08 00:18:01 +0500
commit2e6fcdb2d0126ddf6dac449d950ffbf5c7c523ba (patch)
treebce218ffd664831d79c2e575de6ef84b3d1c1124 /plugins/mod_saslauth.lua
parent0595c7a86c4ebbdab236b9f3cf2de4be84f0b90d (diff)
downloadprosody-2e6fcdb2d0126ddf6dac449d950ffbf5c7c523ba.tar.gz
prosody-2e6fcdb2d0126ddf6dac449d950ffbf5c7c523ba.zip
Latin1 support for SASL DIGEST-MD5 (second, and possibly final commit)
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 9884ec5c..bea1012a 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -66,15 +66,14 @@ local function handle_status(session, status)
end
end
-local function password_callback(node, host, mechanism, raw_host)
- log("host", host);
- log("raw_host", raw_host);
- local password = (datamanager.load(node, raw_host, "accounts") or {}).password; -- FIXME handle hashed passwords
+local function password_callback(node, host, mechanism, decoder)
+ 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
+ if decoder then node, host, password = decoder(node), decoder(host), decoder(password); end
return func, md5(node..":"..host..":"..password);
end
end