mirror of https://github.com/apache/activemq.git
Set the secure processing feature on the TransformerFactory
This commit is contained in:
parent
097f82a246
commit
a72b59253f
|
@ -209,6 +209,8 @@ public class CreateCommand extends AbstractCommand {
|
||||||
// utlity method to write an xml source to file
|
// utlity method to write an xml source to file
|
||||||
private void writeToFile(Source src, File file) throws TransformerException {
|
private void writeToFile(Source src, File file) throws TransformerException {
|
||||||
TransformerFactory tFactory = TransformerFactory.newInstance();
|
TransformerFactory tFactory = TransformerFactory.newInstance();
|
||||||
|
tFactory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
|
||||||
|
|
||||||
Transformer fileTransformer = tFactory.newTransformer();
|
Transformer fileTransformer = tFactory.newTransformer();
|
||||||
|
|
||||||
Result res = new StreamResult(file);
|
Result res = new StreamResult(file);
|
||||||
|
|
Loading…
Reference in New Issue