Skip to content

Commit

Permalink
Merge pull request #806 from ready-research/ready-research-XXE
Browse files Browse the repository at this point in the history
Prevent XXE attacks
  • Loading branch information
jeffgbutler committed Jan 18, 2022
2 parents f2ca1ca + a0468b8 commit 7abca13
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -97,6 +97,8 @@ public boolean isConfigurationFile() {
boolean isConfigFile(InputStream inputStream) {
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
factory.setValidating(false);
SAXParser parser = factory.newSAXParser();

Expand Down

0 comments on commit 7abca13

Please sign in to comment.