aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-06-20 22:50:38 +0100
committerMatthew Wild <mwild1@gmail.com>2009-06-20 22:50:38 +0100
commit0f51eb5fa1f49a1a094e291528bf954c63dfadfd (patch)
tree0cb3818beb12b4b9cdb4f49f58c27b00c9e4cef3 /plugins/mod_saslauth.lua
parent7d05900c4bbe9630cc1bb93f88ea57bf7ddedde2 (diff)
parentf5a6ea54cf8b7ed92185326def5af3c14058da96 (diff)
downloadprosody-0f51eb5fa1f49a1a094e291528bf954c63dfadfd.tar.gz
prosody-0f51eb5fa1f49a1a094e291528bf954c63dfadfd.zip
Merge with Tobias
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 78417c0f..02ba41cf 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -64,15 +64,15 @@ local function handle_status(session, status)
end
end
-local function password_callback(node, host, mechanism, decoder)
- local password = (datamanager_load(node, host, "accounts") or {}).password; -- FIXME handle hashed passwords
+local function password_callback(node, hostname, realm, mechanism, decoder)
+ local password = (datamanager_load(node, hostname, "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);
+ if decoder then node, hostname, password = decoder(node), decoder(hostname), decoder(password); end
+ return func, md5(node..":"..realm..":"..password);
end
end
return func, nil;