Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 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 |
| parents | 3afb8aa78069 |
| children | 3c4799467dae |
comparison
equal
deleted
inserted
replaced
| 6908:047becf393ca | 6909:494938dec5d8 |
|---|---|
| 721 return true; | 721 return true; |
| 722 end | 722 end |
| 723 | 723 |
| 724 function room_mt:handle_admin_query_set_command(origin, stanza) | 724 function room_mt:handle_admin_query_set_command(origin, stanza) |
| 725 local item = stanza.tags[1].tags[1]; | 725 local item = stanza.tags[1].tags[1]; |
| 726 if not item then | |
| 727 origin.send(st.error_reply(stanza, "cancel", "bad-request")); | |
| 728 end | |
| 726 if item.attr.jid then -- Validate provided JID | 729 if item.attr.jid then -- Validate provided JID |
| 727 item.attr.jid = jid_prep(item.attr.jid); | 730 item.attr.jid = jid_prep(item.attr.jid); |
| 728 if not item.attr.jid then | 731 if not item.attr.jid then |
| 729 origin.send(st.error_reply(stanza, "modify", "jid-malformed")); | 732 origin.send(st.error_reply(stanza, "modify", "jid-malformed")); |
| 730 return true; | 733 return true; |
