--- a/mod_rest/mod_rest.lua Fri Jan 03 16:33:40 2020 +0100
+++ b/mod_rest/mod_rest.lua Fri Jan 03 18:29:10 2020 +0100
@@ -106,6 +106,8 @@
if payload.name == "iq" then
if payload.attr.type ~= "get" and payload.attr.type ~= "set" then
return errors.new({ code = 422, text = "'iq' stanza must be of type 'get' or 'set'" });
+ elseif #payload.tags ~= 1 then
+ return errors.new({ code = 422, text = "'iq' stanza must have exactly one child tag" });
end
return module:send_iq(payload):next(
function (result)