X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2Fxml%2FXmlUtilTest.java;h=79aa565df9bcf7a0392938be0184384393275c43;hb=refs%2Fchanges%2F47%2F13647%2F1;hp=3796dd996ae47179265837c488a58aa52c60870d;hpb=dd281c0e33267296ad3babbffd03e1122cdb127e;p=controller.git diff --git a/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/xml/XmlUtilTest.java b/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/xml/XmlUtilTest.java index 3796dd996a..79aa565df9 100644 --- a/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/xml/XmlUtilTest.java +++ b/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/xml/XmlUtilTest.java @@ -61,6 +61,18 @@ public class XmlUtilTest { } + @Test(expected = SAXParseException.class) + public void testXXEFlaw() throws Exception { + XmlUtil.readXmlToDocument("\n" + + "]>\n" + + "\n" + + " \n" + + " urn:ietf:params:netconf:base:1.0 &xxe;\n" + + " \n" + + " ]]>]]>"); + } + @Test public void testXPath() throws Exception { final XPathExpression correctXPath = XMLNetconfUtil.compileXPath("/top/innerText");