Software /
code /
prosody
Diff
plugins/mod_saslauth.lua @ 529:631e7d16d22b
Fix for handling latin1 encoded hostnames in SASL
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 03 Dec 2008 22:08:49 +0500 |
parent | 519:cccd610a0ef9 |
child | 563:099d8a102deb |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Wed Dec 03 15:09:58 2008 +0000 +++ b/plugins/mod_saslauth.lua Wed Dec 03 22:08:49 2008 +0500 @@ -64,14 +64,14 @@ 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;