Merge 0.7->trunk

Mon, 22 Mar 2010 15:05:35 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 22 Mar 2010 15:05:35 +0000
changeset 2919
8ce6b680975a
parent 2916
c29ecf0cadff (current diff)
parent 2918
79ca9f686aaf (diff)
child 2920
f3335285b20d

Merge 0.7->trunk

--- a/core/stanza_router.lua	Mon Mar 22 14:59:03 2010 +0000
+++ b/core/stanza_router.lua	Mon Mar 22 15:05:35 2010 +0000
@@ -36,12 +36,14 @@
 		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
 

mercurial