garydgregory commented on code in PR #2635:
URL: https://github.com/apache/activemq/pull/2635#discussion_r4179844266


##########
activemq-console/src/main/java/org/apache/activemq/console/command/CreateCommand.java:
##########
@@ -158,10 +160,10 @@ protected void copyActivemqConf(File srcBase, File 
targetBase, String activemqCo
         File dest = new File(targetBase, DEFAULT_TARGET_ACTIVEMQ_CONF);
         context.print("Copying from: " + src.getCanonicalPath() + "\n          
to: " + dest.getCanonicalPath());
 
-        DocumentBuilder builder = 
XmlFactories.getSafeDocumentBuilderFactory().newDocumentBuilder();
+        DocumentBuilder builder = 
SecureDocumentBuilderFactory.newNSInstance().newDocumentBuilder();
         Element docElem = builder.parse(src).getDocumentElement();
 
-        XPath xpath = XPathFactory.newInstance().newXPath();
+        XPath xpath = SecureXPathFactory.newInstance().newXPath();
         Attr brokerNameAttr = (Attr) xpath.evaluate(DEFAULT_BROKERNAME_XPATH, 
docElem, XPathConstants.NODE);

Review Comment:
   Hm, that may be the case but it feels like we are entering clean up 
territory instead of migrating to Commons Secure XML. I'd rather leave that one 
for the AMQ team and not make this PR more complicated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to