# HG changeset patch # User Waqas Hussain # Date 1246477641 -18000 # Node ID 0ae8787e4e7d15f44ffe932e5bc0859c95abf80d # Parent cc0aa94707753965c7d673be1e005af926336949# Parent c1c7b27b983b4fe21878317c95c2a9fb46f92524 Merged with trunk diff -r cc0aa9470775 -r 0ae8787e4e7d core/s2smanager.lua --- a/core/s2smanager.lua Thu Jul 02 00:43:32 2009 +0500 +++ b/core/s2smanager.lua Thu Jul 02 00:47:21 2009 +0500 @@ -253,7 +253,7 @@ local w = conn.write; host_session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end - conn.write(format([[]], from_host, to_host)); + conn.write(format([[]], from_host, to_host)); log("debug", "Connection attempt in progress..."); return true; end diff -r cc0aa9470775 -r 0ae8787e4e7d core/sessionmanager.lua --- a/core/sessionmanager.lua Thu Jul 02 00:43:32 2009 +0500 +++ b/core/sessionmanager.lua Thu Jul 02 00:47:21 2009 +0500 @@ -165,7 +165,7 @@ (session.log or session)("debug", "Client sent opening to %s", session.host); send(""); - send(format("", session.streamid, session.host)); + send(format("", session.streamid, session.host)); if not hosts[session.host] then -- We don't serve this host... diff -r cc0aa9470775 -r 0ae8787e4e7d plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Thu Jul 02 00:43:32 2009 +0500 +++ b/plugins/mod_saslauth.lua Thu Jul 02 00:47:21 2009 +0500 @@ -12,6 +12,7 @@ local sm_bind_resource = require "core.sessionmanager".bind_resource; local sm_make_authenticated = require "core.sessionmanager".make_authenticated; local base64 = require "util.encodings".base64; +local to_unicode = require "util.encodings".idna.to_unicode; local datamanager_load = require "util.datamanager".load; local usermanager_validate_credentials = require "core.usermanager".validate_credentials; @@ -65,7 +66,7 @@ end local function password_callback(node, hostname, realm, mechanism, decoder) - local password = (datamanager_load(node, hostname, "accounts") or {}).password; -- FIXME handle hashed passwords + local password = (datamanager_load(node, to_unicode(hostname), "accounts") or {}).password; -- FIXME handle hashed passwords local func = function(x) return x; end; if password then if mechanism == "PLAIN" then