File tree 1 file changed +7
-1
lines changed
shared/src/main/scala/scala/xml/factory
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] {
30
30
private lazy val parserInstance = new ThreadLocal [SAXParser ] {
31
31
override def initialValue = {
32
32
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 )
34
40
parser.setNamespaceAware(false )
35
41
parser.newSAXParser()
36
42
}
You can’t perform that action at this time.
0 commit comments