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
hf
9 years ago
Commit
fbda9e5ca33d20477bf52604eba77921ff958afd
1 parent
a065a9f5
do fixes bug to qq login oauth bugs
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
12 deletions
library/Plugin/Partner/qqconnect/class/Oauth.class.php
library/Plugin/Partner/qqconnect/class/Recorder.class.php
library/Plugin/Partner/qqconnect/class/Oauth.class.php
View file @
fbda9e5
...
...
@@ -38,7 +38,7 @@ class Oauth{
// $this->recorder->write('state',$state);
//$_SESSION['qqstate'] = $state;
Session
::
start
(
'yohobuy_qq_session'
,
null
,
'yohobuy.com'
)
->
__set
(
'qqstate'
,
$state
);
setcookie
(
'_QQ_STATE'
,
$state
,
0
,
'/'
,
'.yohobuy.com'
);
//-------构造请求参数列表
$keysArr
=
array
(
...
...
@@ -59,8 +59,7 @@ class Oauth{
//--------验证state防止CSRF攻击
// if($_GET['state'] != $state){
$state
=
Session
::
start
(
'yohobuy_qq_session'
,
null
,
'yohobuy.com'
)
->
__get
(
'qqstate'
);
echo
$state
,
'+++'
,
$_GET
[
'state'
];
$state
=
isset
(
$_COOKIE
[
'_QQ_STATE'
])
?
$_COOKIE
[
'_QQ_STATE'
]
:
null
;
if
(
$_GET
[
'state'
]
!=
$state
)
{
$this
->
error
->
showError
(
"30001"
);
}
...
...
library/Plugin/Partner/qqconnect/class/Recorder.class.php
View file @
fbda9e5
...
...
@@ -8,8 +8,6 @@
require_once
(
QC_CLASS_PATH
.
'ErrorCase.class.php'
);
use
Hood\Session
;
class
Recorder
{
...
...
@@ -27,13 +25,9 @@ class Recorder
if
(
empty
(
$this
->
inc
))
{
$this
->
error
->
showError
(
"20001"
);
}
self
::
$data
=
array
();
$userData
=
Session
::
start
(
'yohobuy_qq_session'
,
null
,
'yohobuy.com'
)
->
__get
(
'QC_userData'
);
if
(
empty
(
$userData
))
{
self
::
$data
=
array
();
}
else
{
self
::
$data
=
$userData
;
}
// if(empty($_SESSION['QC_userData'])){
// self::$data = array();
// }else{
...
...
@@ -71,8 +65,8 @@ class Recorder
function
__destruct
()
{
self
::
$data
=
null
;
//$_SESSION['QC_userData'] = self::$data;
Session
::
start
(
'yohobuy_qq_session'
,
null
,
'yohobuy.com'
)
->
__set
(
'QC_userData'
,
self
::
$data
);
}
}
...
...
Please
register
or
login
to post a comment