From c016526d9d5b57c8b6157cba7eee4bb268e1e9b4 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 5 Dec 2008 19:49:16 +0000 Subject: Backed out changeset 099d8a102deb (committed too much) --- plugins/mod_saslauth.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'plugins/mod_saslauth.lua') diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index d0ba8542..52ef68c7 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -24,8 +24,6 @@ local sm_bind_resource = require "core.sessionmanager".bind_resource; local jid local base64 = require "util.encodings".base64; -local gettime = require "socket".gettime; - local usermanager_validate_credentials = require "core.usermanager".validate_credentials; local t_concat, t_insert = table.concat, table.insert; local tostring = tostring; @@ -66,14 +64,14 @@ local function handle_status(session, status) 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; @@ -144,8 +142,6 @@ module:add_iq_handler("c2s", "urn:ietf:params:xml:ns:xmpp-bind", :tag("bind", { xmlns = xmlns_bind}) :tag("jid"):text(session.full_jid)); end - - session.log("******", "Connection took "..tostring(session.conntimetotal).." seconds"); end); module:add_iq_handler("c2s", "urn:ietf:params:xml:ns:xmpp-session", -- cgit v1.2.3