core/stanza_router.lua

changeset 1368
0cb70958b8fb
parent 1367
e4d660e58dfc
child 1369
633e032a3b4b
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

mercurial