Changeset

4883:68bd8ae9b827

mod_pubsub_feeds: Allow but ignore XML comments and processing instructions This should allow but ignore them, which should be safe.
author Kim Alvefur <zash@zash.se>
date Fri, 04 Feb 2022 21:22:10 +0100
parents 4882:28f6322fad50
children 4884:960afcbc1ead
files mod_pubsub_feeds/mod_pubsub_feeds.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;