Changeset

6558:461217c45a18

stanza_router: Fix routing of 'error' IQs with multiple childs (thanks Pawel)
author Kim Alvefur <zash@zash.se>
date Tue, 06 Jan 2015 17:39:47 +0100
parents 6523:63d3126b75f1
children 6559:0ef7ca5276a1 6574:cd0088c73daf
files core/stanza_router.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/stanza_router.lua	Tue Nov 18 17:40:37 2014 +0000
+++ b/core/stanza_router.lua	Tue Jan 06 17:39:47 2015 +0100
@@ -63,7 +63,7 @@
 		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