This commit is contained in:
jstaerk
2025-03-12 13:43:12 +01:00
parent c3332c3329
commit 2bcedad471
4 changed files with 17 additions and 0 deletions

View File

@@ -356,6 +356,10 @@ public class ZUGFeRDVisualizer {
// Step 4: Setup JAXP using identity transformer
TransformerFactory factory = TransformerFactory.newInstance();
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
Transformer transformer = factory.newTransformer(); // identity transformer
// Step 5: Setup input and output for XSLT transformation