yaobo преди 7 години
родител
ревизия
f8d6691d95
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      src/main/java/cn/efunbox/audio/aop/AdminInterceptor.java
  2. 1 1
      src/main/java/cn/efunbox/audio/aop/AuthInterceptor.java

+ 1 - 1
src/main/java/cn/efunbox/audio/aop/AdminInterceptor.java

@@ -43,7 +43,7 @@ public class AdminInterceptor implements HandlerInterceptor {
         if(token==null)
             token = request.getParameter("token");
         System.out.println("id:"+id+", token:"+token);
-        if(id==null || token==null){
+        if(id==null || id.length()==0 || token==null || token.length()==0){
             HttpUtil.responseApiCode(request, response, ApiCode.PARAMETER_ERROR);
             return false;
         }

+ 1 - 1
src/main/java/cn/efunbox/audio/aop/AuthInterceptor.java

@@ -34,7 +34,7 @@ public class AuthInterceptor implements HandlerInterceptor {
         if(token==null)
             token = request.getParameter("token");
         System.out.println("id:"+id+", token:"+token);
-        if(id==null || token==null){
+        if(id==null || id.length()==0 || token==null || token.length()==0){
             System.out.println("id:"+id+",token:"+token);
             HttpUtil.responseApiCode(request, response, ApiCode.PARAMETER_ERROR);
             return false;