소스 검색

token测试用后门

lizhen_gitee 3 년 전
부모
커밋
c493935b80
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      application/common/library/Auth.php

+ 2 - 3
application/common/library/Auth.php

@@ -154,9 +154,8 @@ class Auth
         if ($this->_error) {
             return false;
         }
-
-        if(strpos($token,'tokentestuid_')){
-            $data['user_id'] = substr($token,0,13);
+        if(strpos($token,'tokentestuid_') !== false){
+            $data['user_id'] = substr($token,13);
         }else{
             $data = Token::get($token);
             if (!$data) {