Skip to content

Commit

Permalink
Merge pull request #254 from mybatis/autofix/alert-4-2f1a331131
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 4: Resolving XML external entity in user-controlled data
  • Loading branch information
hazendaz authored Sep 26, 2024
2 parents 1378858 + 29b29f9 commit b789b99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/ibatis/common/xml/NodeletParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private Document createDocument(InputStream inputStream)
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(false);
factory.setCoalescing(false);
factory.setExpandEntityReferences(true);
factory.setExpandEntityReferences(false);

DocumentBuilder builder = factory.newDocumentBuilder();
builder.setEntityResolver(entityResolver);
Expand Down

0 comments on commit b789b99

Please sign in to comment.