From ad6a65efa1506e70e460430e9636573eed9f2abc Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 30 Mar 2010 19:40:16 +0100 Subject: stanza_router, s2smanager, modulemanager: Fix for handling of the default namespace on stanzas, causing sometimes jabber:client to be sent over s2s, and accepted --- core/s2smanager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/s2smanager.lua') diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 3627661a..ea6fe96d 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -68,7 +68,7 @@ local function bounce_sendq(session, reason) for i, data in ipairs(sendq) do local reply = data[2]; local xmlns = reply.attr.xmlns; - if not xmlns or xmlns == "jabber:client" or xmlns == "jabber:server" then + if not xmlns then reply.attr.type = "error"; reply:tag("error", {type = "cancel"}) :tag("remote-server-not-found", {xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas"}):up(); @@ -91,7 +91,7 @@ function send_to_host(from_host, to_host, data) local host = hosts[from_host].s2sout[to_host]; if host then -- We have a connection to this host already - if host.type == "s2sout_unauthed" and (data.name ~= "db:verify" or not host.dialback_key) and ((not data.xmlns) or data.xmlns == "jabber:client" or data.xmlns == "jabber:server") then + if host.type == "s2sout_unauthed" and (data.name ~= "db:verify" or not host.dialback_key) then (host.log or log)("debug", "trying to send over unauthed s2sout to "..to_host); -- Queue stanza until we are able to send it -- cgit v1.2.3