mod_cloud_notify: Retrieve data form by name and namespace so unknown elements are ignored
--- a/mod_cloud_notify/mod_cloud_notify.lua Thu Jul 28 12:10:09 2016 +0200
+++ b/mod_cloud_notify/mod_cloud_notify.lua Thu Jul 28 12:12:23 2016 +0200
@@ -36,11 +36,7 @@
origin.send(st.error_reply(stanza, "modify", "bad-request", "Missing jid"));
return true;
end
- local publish_options = enable.tags[1];
- if publish_options and ( publish_options.name ~= "x" or publish_options.attr.xmlns ~= "jabber:x:data" ) then
- origin.send(st.error_reply(stanza, "modify", "bad-request", "Invalid publish options"));
- return true;
- end
+ local publish_options = enable:get_child("x", "jabber:x:data");
local user_push_services = push_enabled:get(origin.username);
if not user_push_services then
user_push_services = {};