We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97a2b0c commit ce971b3Copy full SHA for ce971b3
src/main/java/com/acme/XXEVulnFixed.java
@@ -89,6 +89,8 @@ public static Document withDomButDisabled(String xml)
89
public static void withReaderFactory(String xml)
90
throws IOException, SAXException {
91
XMLReader reader = XMLReaderFactory.createXMLReader();
92
+ reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
93
+ reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
94
reader.parse(new InputSource(new StringReader(xml)));
95
}
96
0 commit comments