Skip to content

Commit

Permalink
Merge pull request #3251 from mybatis/autofix/alert-6-2d7812d9b9
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 6: Resolving XML external entity in user-controlled data
  • Loading branch information
hazendaz committed Sep 26, 2024
2 parents 2967694 + 650146b commit 7e8d836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/apache/ibatis/parsing/XPathParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private Document createDocument(InputSource inputSource) {
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 7e8d836

Please sign in to comment.