File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
shared/src/main/scala/scala/xml/factory Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,13 @@ trait XMLLoader[T <: Node] {
3030 private lazy val parserInstance = new ThreadLocal [SAXParser ] {
3131 override def initialValue = {
3232 val parser = SAXParserFactory .newInstance()
33-
33+ parser.setFeature(" http://javax.xml.XMLConstants/feature/secure-processing" , true )
34+ parser.setFeature(" http://apache.org/xml/features/nonvalidating/load-external-dtd" , false )
35+ parser.setFeature(" http://apache.org/xml/features/disallow-doctype-decl" , true )
36+ parser.setFeature(" http://xml.org/sax/features/external-parameter-entities" , false )
37+ parser.setFeature(" http://xml.org/sax/features/external-general-entities" , false )
38+ parser.setFeature(" http://xml.org/sax/features/resolve-dtd-uris" , false )
39+ parser.setXIncludeAware(false )
3440 parser.setNamespaceAware(false )
3541 parser.newSAXParser()
3642 }
You can’t perform that action at this time.
0 commit comments