wangys 5 gadi atpakaļ
vecāks
revīzija
c3c9bf1807

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

@@ -40,8 +40,8 @@ public class AuthInterceptor implements HandlerInterceptor {
         if(device==null){
             HttpUtil.responseApiCode(request, response, ApiCode.NOT_FOUND);
             return false;
-        }else if(device.getTokenNew()==null || !device.getTokenNew().equalsIgnoreCase(token)
-                || device.getTokenOld()==null || !device.getTokenOld().equalsIgnoreCase(token)){
+        }else if((device.getTokenNew()==null || false == device.getTokenNew().equalsIgnoreCase(token))
+                && (device.getTokenOld()==null || false == device.getTokenOld().equalsIgnoreCase(token))){
             HttpUtil.responseApiCode(request,response, ApiCode.INVALID_TOKEN);
             return false;
         }