diff options
author | Kim Alvefur <zash@zash.se> | 2019-12-23 23:28:44 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-12-23 23:28:44 +0100 |
commit | f35ffff6ae2bbee4d18ae932d2df177d289ba633 (patch) | |
tree | 3f0efc2d3878a700aeeef5009829a4c1822c6231 /plugins | |
parent | 0e1961a7c505cade31afd6a18c81c82c76493d6e (diff) | |
download | prosody-f35ffff6ae2bbee4d18ae932d2df177d289ba633.tar.gz prosody-f35ffff6ae2bbee4d18ae932d2df177d289ba633.zip |
mod_muc_mam: Handle form identification error (e.g. not a form at all)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_muc_mam.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua index 1df93a18..fd98e205 100644 --- a/plugins/mod_muc_mam.lua +++ b/plugins/mod_muc_mam.lua @@ -145,7 +145,10 @@ module:hook("iq-set/bare/"..xmlns_mam..":query", function(event) local form = query:get_child("x", "jabber:x:data"); if form then local form_type, err = get_form_type(form); - if form_type ~= xmlns_mam then + if not form_type then + origin.send(st.error_reply(stanza, "modify", "bad-request", "Invalid dataform: "..err)); + return true; + elseif form_type ~= xmlns_mam then origin.send(st.error_reply(stanza, "modify", "bad-request", "Unexpected FORM_TYPE, expected '"..xmlns_mam.."'")); return true; end |