diff options
author | Kim Alvefur <zash@zash.se> | 2016-11-25 05:06:13 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-11-25 05:06:13 +0100 |
commit | beb660feeb0d38fc343de891fcd0ae7d98f9c093 (patch) | |
tree | 353c2dd49cc70da263424ddfad582f4bdabb651a /core | |
parent | d77094644a04481987b841c25f5ef987be1a3a88 (diff) | |
download | prosody-beb660feeb0d38fc343de891fcd0ae7d98f9c093.tar.gz prosody-beb660feeb0d38fc343de891fcd0ae7d98f9c093.zip |
core.stanza_router: Require 'id' attribute on iq stanzas (fixes #785)
Diffstat (limited to 'core')
-rw-r--r-- | core/stanza_router.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua index cf098258..2fb480ee 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -70,6 +70,9 @@ function core_process_stanza(origin, stanza) 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; + elseif not stanza.attr.id then + origin.send(st.error_reply(stanza, "modify", "bad-request", "Missing required 'id' attribute")); + return; end end |