aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2010-03-13 01:54:04 +0000
committerChris Smith <toonarmy@phpbb.com>2010-03-13 02:15:39 +0000
commitd07e152ea7e820c5a0e47aeb8004fa0b5621a314 (patch)
tree4755b21c8767a4330c550fd748f59560786ff1f3 /phpBB/includes
parent60bd1edcb5e5992e6e693d0f68db47e678f7d54a (diff)
downloadforums-d07e152ea7e820c5a0e47aeb8004fa0b5621a314.tar
forums-d07e152ea7e820c5a0e47aeb8004fa0b5621a314.tar.gz
forums-d07e152ea7e820c5a0e47aeb8004fa0b5621a314.tar.bz2
forums-d07e152ea7e820c5a0e47aeb8004fa0b5621a314.tar.xz
forums-d07e152ea7e820c5a0e47aeb8004fa0b5621a314.zip
[bug/58025] Search robots are now redirected if they send a SID in the request
Previously search robots could stumble upon a board link somewhere on the web containing a SID they'd follow it and end up indexing that page with the SID in the request URI, this fix prevents that by redirecting them to the same URI just without the SID.
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/session.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 1a302d5991..8beb0161f9 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -608,6 +608,12 @@ class session
}
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;
}