diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-03-22 15:05:05 +0000 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-03-22 15:05:05 +0000 |
commit | a5c2d24d44c1e33f04bb42e59f5fb66cdf8a31ba (patch) | |
tree | 4aef489c2384952a164379dbea6741be5a6b1c91 /core/stanza_router.lua | |
parent | a4bbf213bfd1d6eed01c6bba0b70216bc9f4bc82 (diff) | |
download | prosody-a5c2d24d44c1e33f04bb42e59f5fb66cdf8a31ba.tar.gz prosody-a5c2d24d44c1e33f04bb42e59f5fb66cdf8a31ba.zip |
stanza_router: Don't send error replies for stanzas of type 'error' and 'result' on unbound authenticated connections. [originally fa84451e9b35 in 0.6]
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r-- | core/stanza_router.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 5aa7aeb0..c47cdd45 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -41,7 +41,9 @@ function core_process_stanza(origin, stanza) and not(stanza.name == "iq" and stanza.attr.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 - origin.send(st.error_reply(stanza, "auth", "not-authorized")); -- FIXME maybe allow stanzas to account or server + 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 |