Skip to content

Commit

Permalink
SECURITY-2832
Browse files Browse the repository at this point in the history
Made changes for XXE vulnerability security issue
  • Loading branch information
jvasnani committed Aug 25, 2022
1 parent 92fad2c commit a92f1fb
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ private static String parseXml(InputStream versionfile) throws IOException
try
{
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
dbFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
dbFactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document document = dBuilder.parse(versionfile);

Expand Down

0 comments on commit a92f1fb

Please sign in to comment.