aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-01-06 17:39:47 +0100
committerKim Alvefur <zash@zash.se>2015-01-06 17:39:47 +0100
commit19d0509f6ca316a97c70e1a17d9474915d07bd0d (patch)
tree4c3e80a82d52e940df49d3ed41b19aa7e58106ff /core
parente014e38cd3c235a5e283b4e9e9fce2135b5d91d1 (diff)
downloadprosody-19d0509f6ca316a97c70e1a17d9474915d07bd0d.tar.gz
prosody-19d0509f6ca316a97c70e1a17d9474915d07bd0d.zip
stanza_router: Fix routing of 'error' IQs with multiple childs (thanks Pawel)
Diffstat (limited to 'core')
-rw-r--r--core/stanza_router.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index bf5b11bc..a2c7b396 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -63,7 +63,7 @@ function core_process_stanza(origin, stanza)
end
if name == "iq" then
if not stanza.attr.id then stanza.attr.id = ""; end -- COMPAT Jabiru doesn't send the id attribute on roster requests
- if not iq_types[st_type] or (st_type ~= "result" and #stanza.tags ~= 1) then
+ if not iq_types[st_type] or ((st_type == "set" or st_type == "get") and (#stanza.tags ~= 1)) then
origin.send(st.error_reply(stanza, "modify", "bad-request", "Invalid IQ type or incorrect number of children"));
return;
end