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 |