🌐 AI搜索 & 代理 主页
Skip to content

Commit b6f0e30

Browse files
authored
Update SimpleGEXFEventDrivenImporter.java (#1144)
Avoid XEE attacks
1 parent bf86bbc commit b6f0e30

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jgrapht-io/src/main/java/org/jgrapht/nio/gexf/SimpleGEXFEventDrivenImporter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ private Schema createSchema()
162162

163163
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
164164

165+
// disable DOCTYPE declaration
166+
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
167+
165168
return factory.newSchema(sources);
166169
}
167170

0 commit comments

Comments
 (0)