Skip to content

Commit

Permalink
improved security during xml parse
Browse files Browse the repository at this point in the history
  • Loading branch information
raydac committed Dec 24, 2022
1 parent 166c1ac commit 3a10e7e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static Document loadXmlDocument(final InputStream inStream,

try {
factory.setFeature("http://apache.org/xml/features/validation/schema", false);
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false);
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
Expand Down

0 comments on commit 3a10e7e

Please sign in to comment.