Software /
code /
prosody
Changeset
6909:494938dec5d8
MUC: Reject muc:admin query with missing <item> child
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 18 Oct 2015 14:00:15 +0200 (2015-10-18) |
parents | 6908:047becf393ca |
children | 6920:7596c37e0a63 |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Sat Oct 17 19:31:43 2015 +0200 +++ b/plugins/muc/muc.lib.lua Sun Oct 18 14:00:15 2015 +0200 @@ -723,6 +723,9 @@ 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