Skip to content

Commit 757fa24

Browse files
author
Luis Arias
committed
To effectively protect internal grails parsing against XXE vulnerabilities it is necessary to set the disallow-doctype-decl feature to true and not false. See https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing.
1 parent 65c7ad9 commit 757fa24

File tree

1 file changed

+1
-1
lines changed
  • grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support

1 file changed

+1
-1
lines changed

grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support/IOUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ private static SAXParserFactory createParserFactory() throws ParserConfiguration
367367
saxParserFactory.setValidating(false);
368368

369369
try {
370-
saxParserFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false);
370+
saxParserFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
371371
} catch (Exception pce) {
372372
// ignore, parser doesn't support
373373
}

0 commit comments

Comments
 (0)