summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-04-18 11:23:39 +0200
committerAndras Timar <andras.timar@collabora.com>2024-02-16 20:50:10 +0100
commitf7ec729f25f374be907bb8cfeeeaed97959287de (patch)
tree8fc3e4c21b479b966f63fcebd916a86aacf4d459
parentf3e13570812f5ef5fa67e6460e315c124007ea47 (diff)
libxml2: upgrade to release 2.10.4
Fixes CVE-2023-29469 and CVE-2023-28484. Also: SAX2: Ignore namespaces in HTML documents which is probably the reason why one test fails, so switch it to parsing XML: HTML parser error : Tag reqif-xhtml:div invalid <reqif-xhtml:div> HTML parser error : Tag reqif-xhtml:table invalid <reqif-xhtml:table cellpadding="2" cellspacing="2"> ... reqif-table.xhtml: C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/test/source/xmltesttools.cxx:195:testReqIfTable::Import_Export equality assertion failed - Expected: 1 - Actual : 0 - In <file:///C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/tempdir/lu134607bxu8q.tmp>, XPath '/html/body/div/table/tr/th' number of nodes is incorrect Change-Id: Icc161b39515c996193366bc777a67eca79e4e892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150544 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit a65f34a536bb37b890c6ee7e506fea63b9dcaac1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150615 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163465 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--download.lst4
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx16
2 files changed, 14 insertions, 6 deletions
diff --git a/download.lst b/download.lst
index 517b532cba87..10c44083c080 100644
--- a/download.lst
+++ b/download.lst
@@ -192,8 +192,8 @@ export LIBWEBP_SHA256SUM := 2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d
export LIBWEBP_TARBALL := libwebp-1.3.2.tar.gz
export XMLSEC_SHA256SUM := 52ced4943f35bd7d0818a38298c1528ca4ac8a54440fd71134a07d2d1370a262
export XMLSEC_TARBALL := xmlsec1-1.2.34.tar.gz
-export LIBXML_SHA256SUM := 5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c
-export LIBXML_VERSION_MICRO := 3
+export LIBXML_SHA256SUM := ed0c91c5845008f1936739e4eee2035531c1c94742c6541f44ee66d885948d45
+export LIBXML_VERSION_MICRO := 4
export LIBXML_TARBALL := libxml2-2.10.$(LIBXML_VERSION_MICRO).tar.xz
export LIBXSLT_SHA256SUM := 8247f33e9a872c6ac859aa45018bc4c4d00b97e2feac9eebc10c93ce1f34dd79
export LIBXSLT_VERSION_MICRO := 35
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 31f6d03902f8..f5b965b2b94b 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -815,16 +815,24 @@ DECLARE_HTMLEXPORT_TEST(testReqIfJpgImg, "reqif-jpg-img.xhtml")
DECLARE_HTMLEXPORT_TEST(testReqIfTable, "reqif-table.xhtml")
{
- htmlDocUniquePtr pDoc = parseHtml(maTempFile);
+ SvMemoryStream aStream;
+ HtmlExportTest::wrapFragment(maTempFile, aStream);
+ xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
CPPUNIT_ASSERT(pDoc);
// <div> was missing, so the XHTML fragment wasn't a valid
// xhtml.BlkStruct.class type anymore.
- assertXPath(pDoc, "/html/body/div/table/tr/th", 1);
+ assertXPath(pDoc,
+ "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th",
+ 1);
// Make sure that the cell background is not written using CSS.
- assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "style");
+ assertXPathNoAttribute(
+ pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th",
+ "style");
// The attribute was present, which is not valid in reqif-xhtml.
- assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "bgcolor");
+ assertXPathNoAttribute(
+ pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th",
+ "bgcolor");
}
DECLARE_HTMLEXPORT_TEST(testReqIfTable2, "reqif-table2.odt")