Software /
code /
prosody
Changeset
10558:40c2500208f4
mod_muc_mam: Handle form identification error (e.g. not a form at all)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 23 Dec 2019 23:28:44 +0100 |
parents | 10557:e1cb869e2f6c |
children | 10559:cfc05e46b979 |
files | plugins/mod_muc_mam.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_muc_mam.lua Mon Dec 23 23:11:28 2019 +0100 +++ b/plugins/mod_muc_mam.lua Mon Dec 23 23:28:44 2019 +0100 @@ -145,7 +145,10 @@ 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