X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=core%2Fstanza_router.lua;h=0e04a4e56457f3a082ca1b80c074cf2fc220632f;hb=3813f633eebc075fc0cf3db4c7da4f24f49e5bc0;hp=72ddebd1d45f72809c1a3270ff3b17cacebbb201;hpb=095d291f5356ff2450c11608fda6bdabc4286f91;p=prosody.git diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 72ddebd1..0e04a4e5 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -1,6 +1,6 @@ -- Prosody IM --- Copyright (C) 2008-2009 Matthew Wild --- Copyright (C) 2008-2009 Waqas Hussain +-- Copyright (C) 2008-2010 Matthew Wild +-- Copyright (C) 2008-2010 Waqas Hussain -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. @@ -36,12 +36,14 @@ function core_process_stanza(origin, stanza) end end - if origin.type == "c2s" then + if origin.type == "c2s" and stanza.attr.xmlns == "jabber:client" then if not origin.full_jid and not(stanza.name == "iq" and stanza.attr.type == "set" and stanza.tags[1] and stanza.tags[1].name == "bind" and stanza.tags[1].attr.xmlns == "urn:ietf:params:xml:ns:xmpp-bind") then -- authenticated client isn't bound and current stanza is not a bind request - origin.send(st.error_reply(stanza, "auth", "not-authorized")); -- FIXME maybe allow stanzas to account or server + if stanza.attr.type ~= "result" and stanza.attr.type ~= "error" then + origin.send(st.error_reply(stanza, "auth", "not-authorized")); -- FIXME maybe allow stanzas to account or server + end return; end