aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-03-04 02:22:45 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-03-04 02:22:45 +0500
commit5d9b9b6b30f06a3e3aa957279357dd42ae19ddf4 (patch)
treea8e15889982004cabaf7d6116db4cc44a54ba77e /core
parent836da37747ac1d76aa76dbc38354daac8c79bb40 (diff)
downloadprosody-5d9b9b6b30f06a3e3aa957279357dd42ae19ddf4.tar.gz
prosody-5d9b9b6b30f06a3e3aa957279357dd42ae19ddf4.zip
stanza_router: Don't send error replies for stanzas of type 'error' and 'result' on unbound authenticated connections.
Diffstat (limited to 'core')
-rw-r--r--core/stanza_router.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index cd7c650b..b5b1b45f 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