Skip to content

Commit

Permalink
Merge pull request #1077 from NASA-PDS/update_xxe_prevention
Browse files Browse the repository at this point in the history
Update XXE prevention code
  • Loading branch information
jordanpadams authored Dec 2, 2024
2 parents 137433c + f0cd7b2 commit d226e14
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ public SchemaValidator() {
schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
try {
schemaFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
schemaFactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
schemaFactory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
} catch (SAXNotRecognizedException | SAXNotSupportedException e) {
LOG.error("Error setting SchemaFactory features to prevent XXE", e);
}
Expand Down

0 comments on commit d226e14

Please sign in to comment.