Authored by 周少峰

uid decryption

... ... @@ -383,6 +383,7 @@ class WebAction extends Controller_Abstract
$userInfo = LoginData::profile($uid);
if (isset($userInfo['data']) && $userInfo['data']) {
$token = Helpers::makeToken($uid);
$userInfo['data']['uid'] = Encryption::encrypt($userInfo['data']['uid']);
$uidCookie = $userInfo['data']['profile_name'] . '::' . $userInfo['data']['uid'] . '::' . $userInfo['data']['vip_info']['title'] . '::' . $token;
$this->setCookie('_UID',$uidCookie,time() + 86400 * 360);
UdpLog::info('syncUserCookie :',$uidCookie);
... ... @@ -412,6 +413,7 @@ class WebAction extends Controller_Abstract
// 兼容老的
if (!empty($cookie)) {
$cookieList = explode('::', $cookie);
$cookieList[1] = intval(Encryption::decrypt($cookieList[1]));
if (isset($cookieList[1]) && $cookieList[1]) {
if ($useSession) {
$token = $this->getSession('_TOKEN');
... ...