Software /
code /
prosody
Diff
core/s2smanager.lua @ 2949:ef19faa7d106
stanza_router, s2smanager, modulemanager: Fix for handling of the default namespace on stanzas, causing sometimes jabber:client to be sent over s2s, and accepted
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 30 Mar 2010 19:40:16 +0100 |
parent | 2923:b7049746bd29 |
child | 2951:294c359a05f5 |
line wrap: on
line diff
--- a/core/s2smanager.lua Wed Mar 24 20:00:22 2010 +0000 +++ b/core/s2smanager.lua Tue Mar 30 19:40:16 2010 +0100 @@ -68,7 +68,7 @@ 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 @@ 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