mirror of https://github.com/halo-dev/halo
Fix xml external entity vulnerability
parent
2056f528fd
commit
568e48733f
|
@ -43,6 +43,7 @@ public class WordPressMigrateUtils {
|
|||
try {
|
||||
SAXReader saxReader = new SAXReader();
|
||||
Document document = saxReader.read(fileInputStream);
|
||||
saxReader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
|
||||
return document.getRootElement();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("can not get root element");
|
||||
|
|
Loading…
Reference in New Issue