diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-07-03 12:42:07 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-07-03 19:10:49 +0200 |
commit | cdda6533b44333b18d3dc6306dfd0f7058e40b32 (patch) | |
tree | 71e50b73dc4a712e95ec63a20279cd3d47fe5489 /unoxml/qa/complex | |
parent | cc256da45a9d4907ecaa61f4912d0c26a97ca266 (diff) |
unoxml: port checkCVE_2012_0037 from java to CppUnittest
so CI will be able to catch the problem reported in
https://gerrit.libreoffice.org/c/core/+/169327
Change-Id: Id00e5f50fbf43f63f4bad5af13a62e4db88f82d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169932
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'unoxml/qa/complex')
-rw-r--r-- | unoxml/qa/complex/unoxml/RDFRepositoryTest.java | 14 | ||||
-rw-r--r-- | unoxml/qa/complex/unoxml/testdocuments/cve_2012_0037.rdf | 19 |
2 files changed, 0 insertions, 33 deletions
diff --git a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java index 54277a0f4ac5..a24e159af40b 100644 --- a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java +++ b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java @@ -531,20 +531,6 @@ public class RDFRepositoryTest } } - @Test public void checkCVE_2012_0037() throws Exception - { - XInputStream xIn = new StreamSimulator( - TestDocument.getUrl("cve_2012_0037.rdf"), true, param); - xRep.importGraph(FileFormat.RDF_XML, xIn, manifest, base); - XNamedGraph xGraph = xRep.getGraph(manifest); - assertNotNull("no graph", xGraph); - XEnumeration xEnum = xGraph.getStatements(foo, bar, null); - // there must not be anything more than "EVIL" in the literal - XLiteral evil = Literal.create(xContext, "EVIL"); - Statement FooBarEvil = new Statement(foo, bar, evil, manifest); - assertTrue("EVIL", eq(xEnum, new Statement [] { FooBarEvil })); - } - // utilities ------------------------------------------------------------- public void report(Exception e) { diff --git a/unoxml/qa/complex/unoxml/testdocuments/cve_2012_0037.rdf b/unoxml/qa/complex/unoxml/testdocuments/cve_2012_0037.rdf deleted file mode 100644 index 9e2327cef0d8..000000000000 --- a/unoxml/qa/complex/unoxml/testdocuments/cve_2012_0037.rdf +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE rdf [ - <!ENTITY file SYSTEM "file:///etc/passwd"> -]> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * ---> -<rdf:RDF - xmlns:baz="uri:" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> - <rdf:Description rdf:about="uri:foo"> - <baz:bar>EVIL&file;</baz:bar> - </rdf:Description> -</rdf:RDF> |