Software /
code /
prosody-modules
Diff
mod_rest/mod_rest.lua @ 3801:d59fb4dcf100
mod_rest: Verify that @xmlns is left empty
Prosody needs it to be empty internally.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 30 Dec 2019 07:22:15 +0100 |
parent | 3799:a1f1f703d604 |
child | 3802:f88e07630e4e |
line wrap: on
line diff
--- a/mod_rest/mod_rest.lua Mon Dec 30 07:21:46 2019 +0100 +++ b/mod_rest/mod_rest.lua Mon Dec 30 07:22:15 2019 +0100 @@ -24,6 +24,9 @@ -- parse fail return errors.new({ code = 400, text = err }); end + if payload.attr.xmlns then + return errors.new({ code = 400, text = "'xmlns' attribute must be empty" }); + end local to = jid.prep(payload.attr.to); if not to then return errors.new({ code = 400, text = "Invalid destination JID" });