Skip to content

Commit

Permalink
Disable external entity support in javax.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
GDLMadushanka committed Dec 8, 2023
1 parent 47cf14f commit 8dd2459
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ protected void handleException(String msg) {
public void readInputFactoryProperties() {
//ignore DTDs for XML Input
inputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE);
inputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
inputFactory.setProperty(XMLInputFactory.IS_COALESCING, true);
Map props = StAXUtils.loadFactoryProperties("XMLInputFactory.properties");
if (props != null) {
Expand Down

0 comments on commit 8dd2459

Please sign in to comment.