diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/modulemanager.lua | 2 | ||||
-rw-r--r-- | core/stanza_router.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 082dcbb8..5ea0a22e 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -257,7 +257,7 @@ function handle_stanza(host, origin, stanza) if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); end - elseif not(name == "features" and xmlns == "http://etherx.jabber.org/streams") then -- FIXME remove check once we handle S2S features + elseif not((name == "features" or name == "error") and xmlns == "http://etherx.jabber.org/streams") then -- FIXME remove check once we handle S2S features origin:close("unsupported-stanza-type"); end end diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 9d7bb36a..d3bd2445 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -139,7 +139,7 @@ function core_post_stanza(origin, stanza) end local event_data = {origin=origin, stanza=stanza}; - if origin.full_jid then -- c2s connection + if origin.full_jid == stanza.attr.from then -- c2s connection if hosts[origin.host].events.fire_event('pre-'..stanza.name..to_type, event_data) then return; end -- do preprocessing end local h = hosts[to_bare] or hosts[host or origin.host]; @@ -151,7 +151,7 @@ function core_post_stanza(origin, stanza) return; end if not modules_handle_stanza(h.host, origin, stanza) then - if stanza.attr.xmlns == "jabber:client" and stanza.attr.type ~= "result" and stanza.attr.type ~= "error" then + if stanza.attr.type ~= "result" and stanza.attr.type ~= "error" then origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); end end |