X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fapi%2FNetconfDocumentedException.java;h=e1e932b55a31e709a5618dc23818cc848d07e088;hp=e5f32653c53d1a9cfd6bdd19dde5ce4d22bf339f;hb=refs%2Fchanges%2F47%2F13647%2F1;hpb=e719eefb01604c4004a459a0c9999053e747360c diff --git a/opendaylight/netconf/netconf-api/src/main/java/org/opendaylight/controller/netconf/api/NetconfDocumentedException.java b/opendaylight/netconf/netconf-api/src/main/java/org/opendaylight/controller/netconf/api/NetconfDocumentedException.java index e5f32653c5..e1e932b55a 100644 --- a/opendaylight/netconf/netconf-api/src/main/java/org/opendaylight/controller/netconf/api/NetconfDocumentedException.java +++ b/opendaylight/netconf/netconf-api/src/main/java/org/opendaylight/controller/netconf/api/NetconfDocumentedException.java @@ -45,6 +45,15 @@ public class NetconfDocumentedException extends Exception { static { BUILDER_FACTORY = DocumentBuilderFactory.newInstance(); + try { + BUILDER_FACTORY.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); + BUILDER_FACTORY.setFeature("http://xml.org/sax/features/external-general-entities", false); + BUILDER_FACTORY.setFeature("http://xml.org/sax/features/external-parameter-entities", false); + BUILDER_FACTORY.setXIncludeAware(false); + BUILDER_FACTORY.setExpandEntityReferences(false); + } catch (ParserConfigurationException e) { + throw new ExceptionInInitializerError(e); + } BUILDER_FACTORY.setNamespaceAware(true); BUILDER_FACTORY.setCoalescing(true); BUILDER_FACTORY.setIgnoringElementContentWhitespace(true);