core.stanza_router: Remove hack for allowing resource binding IQ before resource binding
authorKim Alvefur <zash@zash.se>
Tue, 13 Dec 2016 18:16:20 +0100
changeset 7788 cdffbda59b03
parent 7787 9f70d35a1602
child 7789 b62353e6a8e5
child 7790 200f1f6306a7
core.stanza_router: Remove hack for allowing resource binding IQ before resource binding
core/stanza_router.lua
--- a/core/stanza_router.lua	Tue Dec 13 18:15:17 2016 +0100
+++ b/core/stanza_router.lua	Tue Dec 13 18:16:20 2016 +0100
@@ -79,16 +79,6 @@
 			end
 		end
 
-		if not origin.full_jid
-			and not(name == "iq" and st_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
-			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
-
 		-- TODO also, stanzas should be returned to their original state before the function ends
 		stanza.attr.from = origin.full_jid;
 	end