mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-02 22:02:07 +02:00
[ticket/9912] Fix error in logic. Do not strip SID when user is not a bot.
This also moves the code up to the point where we know that the user is a bot. Regression from d07e152ea7e820c5a0e47aeb8004fa0b5621a314 PHPBB3-9912
This commit is contained in:
parent
0c23d6c069
commit
3b15fe0a5b
@ -583,6 +583,13 @@ class session
|
|||||||
$bot = false;
|
$bot = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bot user, if they have a SID in the Request URI we need to get rid of it
|
||||||
|
// otherwise they'll index this page with the SID, duplicate content oh my!
|
||||||
|
if ($bot && isset($_GET['sid']))
|
||||||
|
{
|
||||||
|
redirect(build_url(array('sid')));
|
||||||
|
}
|
||||||
|
|
||||||
// If no data was returned one or more of the following occurred:
|
// If no data was returned one or more of the following occurred:
|
||||||
// Key didn't match one in the DB
|
// Key didn't match one in the DB
|
||||||
// User does not exist
|
// User does not exist
|
||||||
@ -619,12 +626,6 @@ class session
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Bot user, if they have a SID in the Request URI we need to get rid of it
|
|
||||||
// otherwise they'll index this page with the SID, duplicate content oh my!
|
|
||||||
if (isset($_GET['sid']))
|
|
||||||
{
|
|
||||||
redirect(build_url(array('sid')));
|
|
||||||
}
|
|
||||||
$this->data['session_last_visit'] = $this->time_now;
|
$this->data['session_last_visit'] = $this->time_now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user