mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-29 01:18:36 +08:00
🎨 修复测试代码
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package me.chanjar.weixin.common.util;
|
||||
|
||||
import org.apache.commons.lang3.RegExUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
@ -17,7 +18,7 @@ public class DataUtils {
|
||||
public static <E> E handleDataWithSecret(E data) {
|
||||
E dataForLog = data;
|
||||
if(data instanceof String && StringUtils.contains((String)data, "&secret=")){
|
||||
dataForLog = (E) StringUtils.replaceAll((String)data,"&secret=\\w+&","&secret=******&");
|
||||
dataForLog = (E) RegExUtils.replaceAll((String)data,"&secret=\\w+&","&secret=******&");
|
||||
}
|
||||
return dataForLog;
|
||||
}
|
||||
|
||||
@ -80,7 +80,6 @@ public class XStreamInitializer {
|
||||
};
|
||||
xstream.ignoreUnknownElements();
|
||||
xstream.setMode(XStream.NO_REFERENCES);
|
||||
XStream.setupDefaultSecurity(xstream);
|
||||
xstream.autodetectAnnotations(true);
|
||||
|
||||
// setup proper security by limiting which classes can be loaded by XStream
|
||||
|
||||
Reference in New Issue
Block a user