diff options
author | Tobias Markmann <tm@ayena.de> | 2009-06-20 19:34:30 +0200 |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2009-06-20 19:34:30 +0200 |
commit | 968abac4691ef34b3238f2f8079bd3fc91da28ce (patch) | |
tree | 6293818b5821d107d21daeef4eb30735f2604691 /plugins/mod_saslauth.lua | |
parent | 8be1d2e2d67939f263e0e1b2ed202e2aa9ea4eff (diff) | |
download | prosody-968abac4691ef34b3238f2f8079bd3fc91da28ce.tar.gz prosody-968abac4691ef34b3238f2f8079bd3fc91da28ce.zip |
Adding a parameter for realm to the password_callback.
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r-- | plugins/mod_saslauth.lua | 8 |
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; |