Explorar el Código

token测试用后门

lizhen_gitee hace 3 años
padre
commit
c493935b80
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  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) {