Showing
1 changed file
with
2 additions
and
0 deletions
@@ -383,6 +383,7 @@ class WebAction extends Controller_Abstract | @@ -383,6 +383,7 @@ class WebAction extends Controller_Abstract | ||
383 | $userInfo = LoginData::profile($uid); | 383 | $userInfo = LoginData::profile($uid); |
384 | if (isset($userInfo['data']) && $userInfo['data']) { | 384 | if (isset($userInfo['data']) && $userInfo['data']) { |
385 | $token = Helpers::makeToken($uid); | 385 | $token = Helpers::makeToken($uid); |
386 | + $userInfo['data']['uid'] = Encryption::encrypt($userInfo['data']['uid']); | ||
386 | $uidCookie = $userInfo['data']['profile_name'] . '::' . $userInfo['data']['uid'] . '::' . $userInfo['data']['vip_info']['title'] . '::' . $token; | 387 | $uidCookie = $userInfo['data']['profile_name'] . '::' . $userInfo['data']['uid'] . '::' . $userInfo['data']['vip_info']['title'] . '::' . $token; |
387 | $this->setCookie('_UID',$uidCookie,time() + 86400 * 360); | 388 | $this->setCookie('_UID',$uidCookie,time() + 86400 * 360); |
388 | UdpLog::info('syncUserCookie :',$uidCookie); | 389 | UdpLog::info('syncUserCookie :',$uidCookie); |
@@ -412,6 +413,7 @@ class WebAction extends Controller_Abstract | @@ -412,6 +413,7 @@ class WebAction extends Controller_Abstract | ||
412 | // 兼容老的 | 413 | // 兼容老的 |
413 | if (!empty($cookie)) { | 414 | if (!empty($cookie)) { |
414 | $cookieList = explode('::', $cookie); | 415 | $cookieList = explode('::', $cookie); |
416 | + $cookieList[1] = intval(Encryption::decrypt($cookieList[1])); | ||
415 | if (isset($cookieList[1]) && $cookieList[1]) { | 417 | if (isset($cookieList[1]) && $cookieList[1]) { |
416 | if ($useSession) { | 418 | if ($useSession) { |
417 | $token = $this->getSession('_TOKEN'); | 419 | $token = $this->getSession('_TOKEN'); |
-
Please register or login to post a comment