Blame SOURCES/0014-install-script-Don-t-expand-entities-when-parsing-XM.patch

b5bae8
From 518ac5029578b07471ed2aa15f6c924073075ddf Mon Sep 17 00:00:00 2001
b5bae8
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
b5bae8
Date: Mon, 12 Aug 2019 15:28:07 +0200
b5bae8
Subject: [PATCH] install-script: Don't expand entities when parsing XML
b5bae8
MIME-Version: 1.0
b5bae8
Content-Type: text/plain; charset=UTF-8
b5bae8
Content-Transfer-Encoding: 8bit
b5bae8
b5bae8
The XML_PARSE_NOENT flag to libxml will cause it to expand all entities
b5bae8
in the input XML document when parsing. Doing this is bad practice if the
b5bae8
XML input file comes from an untrusted source, because it can cause the
b5bae8
XML parser to load arbitrary files that are readable by the user running
b5bae8
XML parsing.
b5bae8
b5bae8
This is basically the same fix as 47233d0b9dc (from osinfo-db-tools)
b5bae8
b5bae8
Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
b5bae8
---
b5bae8
 osinfo/osinfo_install_script.c | 2 +-
b5bae8
 1 file changed, 1 insertion(+), 1 deletion(-)
b5bae8
b5bae8
diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
b5bae8
index 906fb83..5cd00a0 100644
b5bae8
--- a/osinfo/osinfo_install_script.c
b5bae8
+++ b/osinfo/osinfo_install_script.c
b5bae8
@@ -725,7 +725,7 @@ static xsltStylesheetPtr osinfo_install_script_load_template(const gchar *uri,
b5bae8
     }
b5bae8
 
b5bae8
     if (!(doc = xmlCtxtReadDoc(pctxt, BAD_CAST template, uri, NULL,
b5bae8
-                               XML_PARSE_NOENT | XML_PARSE_NONET |
b5bae8
+                               XML_PARSE_NONET |
b5bae8
                                XML_PARSE_NOWARNING))) {
b5bae8
         g_set_error_literal(error, OSINFO_ERROR, 0,
b5bae8
                             _("Unable to read XSL template"));
b5bae8
-- 
b5bae8
2.21.0
b5bae8