Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -56,6 +56,11 @@ cdn.url=https://testhsaypic.coolstore.cn
|
|||||||
trtc.sdkAppId=1400811820
|
trtc.sdkAppId=1400811820
|
||||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||||
|
|
||||||
|
weixin.appId=wx6f984e535e571818
|
||||||
|
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||||
|
|
||||||
|
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||||
|
|
||||||
#xxljob配置
|
#xxljob配置
|
||||||
xxl.job.admin.addresses = http://10.7.53.224:10001/xxl-job-admin
|
xxl.job.admin.addresses = http://10.7.53.224:10001/xxl-job-admin
|
||||||
xxl.job.executor.appname = ${spring.application.name}
|
xxl.job.executor.appname = ${spring.application.name}
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ corp.id = 171cddee76471740
|
|||||||
trtc.sdkAppId=1400811820
|
trtc.sdkAppId=1400811820
|
||||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||||
|
|
||||||
|
weixin.appId=wx6f984e535e571818
|
||||||
|
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||||
|
|
||||||
|
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||||
|
|
||||||
#xxljob配置
|
#xxljob配置
|
||||||
xxl.job.admin.addresses = https://djob.coolstore.cn/xxl-job-admin
|
xxl.job.admin.addresses = https://djob.coolstore.cn/xxl-job-admin
|
||||||
xxl.job.executor.appname = ${spring.application.name}
|
xxl.job.executor.appname = ${spring.application.name}
|
||||||
|
|||||||
@@ -51,4 +51,9 @@ corp.id = 171cddee76471740
|
|||||||
|
|
||||||
#TRTC
|
#TRTC
|
||||||
trtc.sdkAppId=1400811820
|
trtc.sdkAppId=1400811820
|
||||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||||
|
|
||||||
|
weixin.appId=wx6f984e535e571818
|
||||||
|
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||||
|
|
||||||
|
signKey=d851f2a9ac90474abecdc2fbb148d4d7
|
||||||
@@ -59,6 +59,11 @@ cdn.url=https://testhsaypic.coolstore.cn
|
|||||||
trtc.sdkAppId=1400811820
|
trtc.sdkAppId=1400811820
|
||||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||||
|
|
||||||
|
weixin.appId=wx6f984e535e571818
|
||||||
|
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||||
|
|
||||||
|
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||||
|
|
||||||
xxl.job.admin.addresses =
|
xxl.job.admin.addresses =
|
||||||
xxl.job.executor.appname = ${spring.application.name}
|
xxl.job.executor.appname = ${spring.application.name}
|
||||||
xxl.job.executor.ip =
|
xxl.job.executor.ip =
|
||||||
|
|||||||
@@ -51,4 +51,9 @@ corp.id = 171cddee76471740
|
|||||||
|
|
||||||
#TRTC
|
#TRTC
|
||||||
trtc.sdkAppId=1400811820
|
trtc.sdkAppId=1400811820
|
||||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||||
|
|
||||||
|
weixin.appId=wx6f984e535e571818
|
||||||
|
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||||
|
|
||||||
|
signKey=d851f2a9ac90474abecdc2fbb148d4d7
|
||||||
@@ -51,4 +51,9 @@ corp.id = 171cddee76471740
|
|||||||
|
|
||||||
#TRTC
|
#TRTC
|
||||||
trtc.sdkAppId=1400811820
|
trtc.sdkAppId=1400811820
|
||||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||||
|
|
||||||
|
weixin.appId=wx6f984e535e571818
|
||||||
|
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||||
|
|
||||||
|
signKey=d851f2a9ac90474abecdc2fbb148d4d7
|
||||||
@@ -51,4 +51,9 @@ corp.id = 171cddee76471740
|
|||||||
|
|
||||||
#TRTC
|
#TRTC
|
||||||
trtc.sdkAppId=1400811820
|
trtc.sdkAppId=1400811820
|
||||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||||
|
|
||||||
|
weixin.appId=wx6f984e535e571818
|
||||||
|
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||||
|
|
||||||
|
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||||
@@ -46,7 +46,7 @@ public class SignValidateFilter implements Filter {
|
|||||||
|
|
||||||
private static List<String> patternList =
|
private static List<String> patternList =
|
||||||
Lists.newArrayList("/web/check/ok","/check/ok",
|
Lists.newArrayList("/web/check/ok","/check/ok",
|
||||||
"/partner/pc/doc.html","/partner/pc/v2/api-docs","/**/test/**","/partner/pc/feiShuLogin","/partner/pc/oss/getUploadFileConfig",
|
"/partner/mini/program/doc.html","/partner/mini/program/v2/api-docs","/**/test/**","/partner/pc/feiShuLogin","/partner/pc/oss/getUploadFileConfig",
|
||||||
"/**/swagger*/**", "/**/webjars/**");
|
"/**/swagger*/**", "/**/webjars/**");
|
||||||
|
|
||||||
|
|
||||||
@@ -79,27 +79,25 @@ public class SignValidateFilter implements Filter {
|
|||||||
String method = request.getMethod();
|
String method = request.getMethod();
|
||||||
String userStr = "";
|
String userStr = "";
|
||||||
boolean isInWhiteList = excludePath(uri);
|
boolean isInWhiteList = excludePath(uri);
|
||||||
|
|
||||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
|
||||||
String jsonStr = JSONObject.toJSONString(parameterMap);
|
|
||||||
JSONObject obj = JSONObject.parseObject(jsonStr);
|
|
||||||
log.info("params:{}", obj.toJSONString());
|
|
||||||
String params = obj.toJSONString();
|
|
||||||
String sign = request.getHeader("SIGN");
|
|
||||||
String nonce = request.getHeader("NONCE");
|
|
||||||
String timestamp = request.getHeader("TIMESTAMP");
|
|
||||||
String aesPhone = request.getHeader("PHONE");
|
|
||||||
String openid = request.getHeader("OPENID");
|
|
||||||
String phone = AesUtil.decrypt(aesPhone, signKey);
|
|
||||||
String md5Value = phone + Md5Utils.md5(Md5Utils.md5(openid));
|
|
||||||
log.info("sign:{}, nonce:{}, timestamp:{},aesPhone:{}, openid:{}, 解密后的手机号:{}, md5Value:{}",
|
|
||||||
sign, nonce, timestamp, aesPhone, openid, phone, md5Value);
|
|
||||||
String signStr = timestamp + nonce + params + signKey + md5Value;
|
|
||||||
String newSign = Sha1Utils.getSha1(signStr.getBytes());
|
|
||||||
log.info("newSign: {}", newSign);
|
|
||||||
|
|
||||||
log.info("url:{}", uri);
|
log.info("url:{}", uri);
|
||||||
if ( !isInWhiteList && !method.equals("OPTIONS")) {
|
if ( !isInWhiteList && !method.equals("OPTIONS")) {
|
||||||
|
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||||
|
String jsonStr = JSONObject.toJSONString(parameterMap);
|
||||||
|
JSONObject obj = JSONObject.parseObject(jsonStr);
|
||||||
|
log.info("params:{}", obj.toJSONString());
|
||||||
|
String params = obj.toJSONString();
|
||||||
|
String sign = request.getHeader("SIGN");
|
||||||
|
String nonce = request.getHeader("NONCE");
|
||||||
|
String timestamp = request.getHeader("TIMESTAMP");
|
||||||
|
String aesPhone = request.getHeader("PHONE");
|
||||||
|
String openid = request.getHeader("OPENID");
|
||||||
|
String phone = AesUtil.decrypt(aesPhone, signKey);
|
||||||
|
String md5Value = phone + Md5Utils.md5(Md5Utils.md5(openid));
|
||||||
|
log.info("sign:{}, nonce:{}, timestamp:{},aesPhone:{}, openid:{}, 解密后的手机号:{}, md5Value:{}",
|
||||||
|
sign, nonce, timestamp, aesPhone, openid, phone, md5Value);
|
||||||
|
String signStr = timestamp + nonce + params + signKey + md5Value;
|
||||||
|
String newSign = Sha1Utils.getSha1(signStr.getBytes());
|
||||||
|
log.info("newSign: {}", newSign);
|
||||||
// 前后端验签不等
|
// 前后端验签不等
|
||||||
if (!newSign.equals(sign)) {
|
if (!newSign.equals(sign)) {
|
||||||
response.setStatus(HttpStatus.OK.value());
|
response.setStatus(HttpStatus.OK.value());
|
||||||
|
|||||||
Reference in New Issue
Block a user