Software /
code /
prosody
Comparison
core/stanza_router.lua @ 1368:0cb70958b8fb
stanza_router: Fixed a corner case where processing could continue after an error reply
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 20 Jun 2009 17:53:39 +0500 |
parent | 1367:e4d660e58dfc |
child | 1369:633e032a3b4b |
comparison
equal
deleted
inserted
replaced
1367:e4d660e58dfc | 1368:0cb70958b8fb |
---|---|
52 if not origin.full_jid | 52 if not origin.full_jid |
53 and not(stanza.name == "iq" and stanza.attr.type == "set" and stanza.tags[1] and stanza.tags[1].name == "bind" | 53 and not(stanza.name == "iq" and stanza.attr.type == "set" and stanza.tags[1] and stanza.tags[1].name == "bind" |
54 and stanza.tags[1].attr.xmlns == "urn:ietf:params:xml:ns:xmpp-bind") then | 54 and stanza.tags[1].attr.xmlns == "urn:ietf:params:xml:ns:xmpp-bind") then |
55 -- authenticated client isn't bound and current stanza is not a bind request | 55 -- authenticated client isn't bound and current stanza is not a bind request |
56 origin.send(st.error_reply(stanza, "auth", "not-authorized")); -- FIXME maybe allow stanzas to account or server | 56 origin.send(st.error_reply(stanza, "auth", "not-authorized")); -- FIXME maybe allow stanzas to account or server |
57 return; | |
57 end | 58 end |
58 | 59 |
59 -- TODO also, stanzas should be returned to their original state before the function ends | 60 -- TODO also, stanzas should be returned to their original state before the function ends |
60 stanza.attr.from = origin.full_jid; | 61 stanza.attr.from = origin.full_jid; |
61 end | 62 end |