MUC: Fix traceback on muc#admin query with missing <item> child (#1242) 0.11
authorKim Alvefur <zash@zash.se>
Sun, 25 Nov 2018 13:04:37 +0100
branch0.11
changeset 9644 28d4b9d5a432
parent 9643 78caa4aafda1
child 9645 0ce404230388
child 9648 e31547ab1ca2
MUC: Fix traceback on muc#admin query with missing <item> child (#1242) Caused by a missing return statement introduced in 494938dec5d8
plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Sun Nov 18 15:40:24 2018 +0000
+++ b/plugins/muc/muc.lib.lua	Sun Nov 25 13:04:37 2018 +0100
@@ -904,6 +904,7 @@
 	local item = stanza.tags[1].tags[1];
 	if not item then
 		origin.send(st.error_reply(stanza, "cancel", "bad-request"));
+		return true;
 	end
 	if item.attr.jid then -- Validate provided JID
 		item.attr.jid = jid_prep(item.attr.jid);