Commit ded60957 authored by 以墨为白's avatar 以墨为白 🎧

1

parent 3960d3fb
...@@ -94,7 +94,7 @@ public class SignatureVerificationFilter extends OncePerRequestFilter { ...@@ -94,7 +94,7 @@ public class SignatureVerificationFilter extends OncePerRequestFilter {
// 防止请求重放,nonce只能用一次,放在redis中,有效期 20分钟 // 防止请求重放,nonce只能用一次,放在redis中,有效期 20分钟
String nonceKey = "api_signature:nonce:" + nonce; String nonceKey = "api_signature:nonce:" + nonce;
if (Boolean.FALSE.equals(this.redisTemplate.opsForValue().setIfAbsent(nonceKey, "1", 20, TimeUnit.MINUTES))) { if (Boolean.FALSE.equals(this.redisTemplate.opsForValue().setIfAbsent(nonceKey, "1", 20, TimeUnit.MINUTES))) {
this.write(response, "nonce无效"); this.write(response, "nonce无效:" + nonce);
return false; return false;
} }
...@@ -102,7 +102,7 @@ public class SignatureVerificationFilter extends OncePerRequestFilter { ...@@ -102,7 +102,7 @@ public class SignatureVerificationFilter extends OncePerRequestFilter {
AppStore appStore = this.appStoreService.getAppSecretInfo(appId); AppStore appStore = this.appStoreService.getAppSecretInfo(appId);
String appSecret = appStore.getAppSecret(); String appSecret = appStore.getAppSecret();
if (!StringUtils.hasText(appSecret)) { if (!StringUtils.hasText(appSecret)) {
this.write(response, "appId无效"); this.write(response, "appId无效:" + appId);
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment