mod_pubsub_feeds: Allow but ignore XML comments and processing instructions
This should allow but ignore them, which should be safe.
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Fri Feb 04 16:25:23 2022 +0100
+++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Fri Feb 04 21:22:10 2022 +0100
@@ -26,7 +26,7 @@
local xmlns_atom = "http://www.w3.org/2005/Atom";
local function parse_feed(data)
- local feed, err = parse_xml(data);
+ local feed, err = parse_xml(data, { allow_processing_instructions = true; allow_comments = true });
if not feed then return feed, err; end
if feed.attr.xmlns == xmlns_atom then
return feed;