Skip to content

Commit 87a128b

Browse files
authored
RANGER-5477: Fix TransformerFactory incompatibility causing plugin installation failures (#842)
1 parent f835ca2 commit 87a128b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

agents-installer/src/main/java/org/apache/ranger/utils/install/XmlConfigChanger.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,8 @@ public void run() throws ParserConfigurationException, SAXException, IOException
283283

284284
TransformerFactory tfactory = TransformerFactory.newInstance();
285285

286-
tfactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
287-
tfactory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
288-
tfactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
286+
tfactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
287+
tfactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
289288
tfactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
290289

291290
Transformer transformer = tfactory.newTransformer();

0 commit comments

Comments
 (0)