Mercurial > prosody-hg
comparison core/stanza_router.lua @ 2917:2a6552b22f01
stanza_router: Allow non-jabber:client elements after auth, before bind. [originally 2c538d4bde13 in 0.6]
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Mon, 22 Mar 2010 15:04:22 +0000 |
| parents | f9bc95aadc26 |
| children | 79ca9f686aaf |
comparison
equal
deleted
inserted
replaced
| 2915:f47bd0f7e2e6 | 2917:2a6552b22f01 |
|---|---|
| 34 origin.send(st.error_reply(stanza, "modify", "bad-request")); | 34 origin.send(st.error_reply(stanza, "modify", "bad-request")); |
| 35 return; | 35 return; |
| 36 end | 36 end |
| 37 end | 37 end |
| 38 | 38 |
| 39 if origin.type == "c2s" then | 39 if origin.type == "c2s" and stanza.attr.xmlns == "jabber:client" then |
| 40 if not origin.full_jid | 40 if not origin.full_jid |
| 41 and not(stanza.name == "iq" and stanza.attr.type == "set" and stanza.tags[1] and stanza.tags[1].name == "bind" | 41 and not(stanza.name == "iq" and stanza.attr.type == "set" and stanza.tags[1] and stanza.tags[1].name == "bind" |
| 42 and stanza.tags[1].attr.xmlns == "urn:ietf:params:xml:ns:xmpp-bind") then | 42 and stanza.tags[1].attr.xmlns == "urn:ietf:params:xml:ns:xmpp-bind") then |
| 43 -- authenticated client isn't bound and current stanza is not a bind request | 43 -- authenticated client isn't bound and current stanza is not a bind request |
| 44 origin.send(st.error_reply(stanza, "auth", "not-authorized")); -- FIXME maybe allow stanzas to account or server | 44 origin.send(st.error_reply(stanza, "auth", "not-authorized")); -- FIXME maybe allow stanzas to account or server |
