Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
周少峰
9 years ago
Commit
f92645768ce0b4dab6a43bd7eaa1fa46e59b989a
1 parent
09586a6e
uid decryption
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
library/Action/WebAction.php
library/Action/WebAction.php
View file @
f926457
...
...
@@ -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'
);
...
...
Please
register
or
login
to post a comment