Skip to content

Commit

Permalink
Merge pull request #1685 from copierrj/fix_1682
Browse files Browse the repository at this point in the history
Enable FEATURE_SECURE_PROCESSING
  • Loading branch information
stephanr authored May 22, 2024
2 parents c6bca7c + 6a55c91 commit 71c3e38
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Occam Labs UG (haftungsbeschränkt)
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import javax.xml.XMLConstants;

/**
* Utility methods to transform xml streams with xslt.
Expand All @@ -72,6 +73,7 @@ public static void transform(InputStream doc, URL xsltUrl, OutputStream out)
StreamSource source = new StreamSource(doc);
StreamSource xslt = new StreamSource(new File(xsltUrl.toURI()));
TransformerFactory fac = TransformerFactory.newInstance();
fac.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
Transformer t = fac.newTransformer(xslt);
Result result = new StreamResult(out);
t.transform(source, result);
Expand Down

0 comments on commit 71c3e38

Please sign in to comment.