aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-10-18 14:00:15 +0200
committerKim Alvefur <zash@zash.se>2015-10-18 14:00:15 +0200
commit1407c9f7a72c9e27efb9983554e7579d157aecc6 (patch)
treedbd1f4ff6547c1b2a2fe1ffde3957668af6d78e5
parentd76ba18dc300306e7c6334a26e05064bbf5d628c (diff)
downloadprosody-1407c9f7a72c9e27efb9983554e7579d157aecc6.tar.gz
prosody-1407c9f7a72c9e27efb9983554e7579d157aecc6.zip
MUC: Reject muc:admin query with missing <item> child
-rw-r--r--plugins/muc/muc.lib.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index cb182fec..7db463e5 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -723,6 +723,9 @@ end
function room_mt:handle_admin_query_set_command(origin, stanza)
local item = stanza.tags[1].tags[1];
+ if not item then
+ origin.send(st.error_reply(stanza, "cancel", "bad-request"));
+ end
if item.attr.jid then -- Validate provided JID
item.attr.jid = jid_prep(item.attr.jid);
if not item.attr.jid then