File tree 2 files changed +5
-0
lines changed
local-s3-rest/src/main/java/com/robothy/s3/rest
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,9 @@ private ServiceFactory createServiceFactory() {
122
122
123
123
XMLInputFactory input = new WstxInputFactory ();
124
124
input .setProperty (XMLInputFactory .IS_NAMESPACE_AWARE , Boolean .FALSE );
125
+ input .setProperty (XMLInputFactory .SUPPORT_DTD , Boolean .FALSE ); // Disable DTDs
126
+ input .setProperty (XMLInputFactory .IS_SUPPORTING_EXTERNAL_ENTITIES , Boolean .FALSE ); // Disable external entities
127
+
125
128
XmlMapper xmlMapper = new XmlMapper (new XmlFactory (input , new WstxOutputFactory ()));
126
129
xmlMapper .configure (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES , false );
127
130
xmlMapper .registerModule (new Jdk8Module ());
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ public class XmlUtils {
17
17
static {
18
18
XMLInputFactory input = new WstxInputFactory ();
19
19
input .setProperty (XMLInputFactory .IS_NAMESPACE_AWARE , Boolean .FALSE );
20
+ input .setProperty (XMLInputFactory .SUPPORT_DTD , Boolean .FALSE );
21
+ input .setProperty (XMLInputFactory .IS_SUPPORTING_EXTERNAL_ENTITIES , Boolean .FALSE );
20
22
xmlMapper = new XmlMapper (new XmlFactory (input , new WstxOutputFactory ()));
21
23
xmlMapper .configure (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES , false );
22
24
xmlMapper .registerModule (new Jdk8Module ());
You can’t perform that action at this time.
0 commit comments