Skip to content

Commit a5c8f13

Browse files
committed
update xstream to 1.4.10
1 parent 556b073 commit a5c8f13

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
<dependency>
167167
<groupId>com.thoughtworks.xstream</groupId>
168168
<artifactId>xstream</artifactId>
169-
<version>1.4.9</version>
169+
<version>1.4.10</version>
170170
</dependency>
171171
<!-- 由于guava较新的21.0版本需要jdk8,故而此处采用较低版本 -->
172172
<dependency>

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/xml/XStreamInitializer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ public String encodeNode(String name) {
4949
xstream.setMode(XStream.NO_REFERENCES);
5050
xstream.addPermission(NullPermission.NULL);
5151
xstream.addPermission(PrimitiveTypePermission.PRIMITIVES);
52+
xstream.allowTypesByWildcard(new String[]{
53+
"me.chanjar.weixin.**", "cn.binarywang.wx.**", "com.github.binarywang.**"
54+
});
55+
56+
XStream.setupDefaultSecurity(xstream);
57+
5258
xstream.setClassLoader(Thread.currentThread().getContextClassLoader());
5359
return xstream;
5460
}

0 commit comments

Comments
 (0)