From 38f7330f883050b10efaaa213dde7cfd77e5f8c5 Mon Sep 17 00:00:00 2001 From: "Taher A. Alkhateeb" Date: Mon, 18 Jun 2018 12:26:14 +0000 Subject: [PATCH] Applied trunk fix on revision r1833708 (OFBIZ-10435) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1833709 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/ofbiz/base/util/UtilXml.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java index 6559784a51..e7503e6de4 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java @@ -431,6 +431,12 @@ public final class UtilXml { factory.setAttribute("http://xml.org/sax/features/validation", validate); factory.setAttribute("http://apache.org/xml/features/validation/schema", validate); + factory.setFeature("http://xml.org/sax/features/external-general-entities", false); + factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); + factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); + factory.setXIncludeAware(false); + factory.setExpandEntityReferences(false); + // with a SchemaUrl, a URL object DocumentBuilder builder = factory.newDocumentBuilder(); if (validate) {