You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2019/05/14 05:40:22 UTC

[activemq] branch master updated: Set the secure processing feature on the TransformerFactory

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/master by this push:
     new a72b592  Set the secure processing feature on the TransformerFactory
     new f6fbd56  Merge pull request #325 from coheigea/transformerfactory_secproc
a72b592 is described below

commit a72b59253f8862253a625d809118e77e8fe2bd43
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Wed Nov 28 18:10:32 2018 +0000

    Set the secure processing feature on the TransformerFactory
---
 .../main/java/org/apache/activemq/console/command/CreateCommand.java    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/activemq-console/src/main/java/org/apache/activemq/console/command/CreateCommand.java b/activemq-console/src/main/java/org/apache/activemq/console/command/CreateCommand.java
index f9f0fb0..3e246ce 100644
--- a/activemq-console/src/main/java/org/apache/activemq/console/command/CreateCommand.java
+++ b/activemq-console/src/main/java/org/apache/activemq/console/command/CreateCommand.java
@@ -209,6 +209,8 @@ public class CreateCommand extends AbstractCommand {
     // utlity method to write an xml source to file
     private void writeToFile(Source src, File file) throws TransformerException {
         TransformerFactory tFactory = TransformerFactory.newInstance();
+        tFactory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
+
         Transformer fileTransformer = tFactory.newTransformer();
 
         Result res = new StreamResult(file);