lyhzzz 1 月之前
父節點
當前提交
6d69a5511b
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/main/java/com/fdkankan/ucenter/aop/SignVerifyAspect.java

+ 3 - 0
src/main/java/com/fdkankan/ucenter/aop/SignVerifyAspect.java

@@ -45,6 +45,9 @@ public class SignVerifyAspect {
         String sign = request.getHeader(verifySign.signParam().toLowerCase());
         String appId = request.getHeader(verifySign.appId().toLowerCase());
 
+        if(StringUtils.isBlank(sign) || StringUtils.isBlank(appId)){
+            throw new BusinessException(ResultCode.SIGN_ERROR);
+        }
         AppSecret byAppId = null;
         if(redisUtil.hasKey("ucenter:sign:appid:"+appId)){
             byAppId = JSONObject.parseObject(redisUtil.get("ucenter:sign:appid:"+appId),AppSecret.class);