Skip to content
Permalink
Browse files
Adding secure processing to the SAXParserFactory
  • Loading branch information
coheigea committed Dec 14, 2018
1 parent 2472ced commit 3e180752a42936cdc5fe11b6003e7e4b13436e13
Showing 1 changed file with 1 addition and 0 deletions.
@@ -210,6 +210,7 @@ private void dehydrate(InputStream input, OutputStream output) throws ParserConf

// Instantiate JAXP SAX parser factory
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
saxParserFactory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
/*
* Set parser to be namespace aware Very important to do otherwise
* invalid FI documents will be created by the SAXDocumentSerializer

0 comments on commit 3e18075

Please sign in to comment.