# HG changeset patch # User Kim Alvefur # Date 1481649380 -3600 # Node ID cdffbda59b0383fe0b92b6fc6b91c6835b0abe8d # Parent 9f70d35a160225443bd8566e65a5d2e5d8e45fc6 core.stanza_router: Remove hack for allowing resource binding IQ before resource binding diff -r 9f70d35a1602 -r cdffbda59b03 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