mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 23:55:26 +02:00
Fix session id assignment for bots (previously this bug related in bots creating a new session for every view, now bots are assigned one session like normal users - still no rotation).
If cookie is there but having an empty session try to get it through the url - but also resetting the user git-svn-id: file:///svn/phpbb/trunk@6248 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
b789628c57
commit
9193878c05
@ -157,6 +157,13 @@ class session
|
|||||||
|
|
||||||
$SID = (defined('NEED_SID')) ? '?sid=' . $this->session_id : '?sid=';
|
$SID = (defined('NEED_SID')) ? '?sid=' . $this->session_id : '?sid=';
|
||||||
$_SID = (defined('NEED_SID')) ? $this->session_id : '';
|
$_SID = (defined('NEED_SID')) ? $this->session_id : '';
|
||||||
|
|
||||||
|
if (empty($this->session_id))
|
||||||
|
{
|
||||||
|
$this->session_id = $_SID = request_var('sid', '');
|
||||||
|
$SID = '?sid=' . $this->session_id;
|
||||||
|
$this->cookie_data = array('u' => 0, 'k' => '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -493,8 +500,8 @@ class session
|
|||||||
$this->set_login_key();
|
$this->set_login_key();
|
||||||
}
|
}
|
||||||
|
|
||||||
$SID = '?sid=';
|
$SID = '?sid=' . $this->session_id;
|
||||||
$_SID = '';
|
$_SID = $this->session_id;
|
||||||
|
|
||||||
if (!$bot)
|
if (!$bot)
|
||||||
{
|
{
|
||||||
@ -504,8 +511,8 @@ class session
|
|||||||
$this->set_cookie('k', $this->cookie_data['k'], $cookie_expire);
|
$this->set_cookie('k', $this->cookie_data['k'], $cookie_expire);
|
||||||
$this->set_cookie('sid', $this->session_id, $cookie_expire);
|
$this->set_cookie('sid', $this->session_id, $cookie_expire);
|
||||||
|
|
||||||
$SID = '?sid=' . $this->session_id;
|
$SID = '?sid=';
|
||||||
$_SID = $this->session_id;
|
$_SID = '';
|
||||||
|
|
||||||
unset($cookie_expire);
|
unset($cookie_expire);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user