Skip to content

Commit

Permalink
Actually call the Referrer Spam check.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattab committed May 11, 2014
1 parent 8659d69 commit acb1bc2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/Tracker/VisitExcluded.php
Expand Up @@ -111,6 +111,14 @@ public function isExcluded()
}
}

// Check if Referrer URL is a known spam
if (!$excluded) {
$excluded = $this->isReferrerSpamExcluded();
if ($excluded) {
Common::printDebug("Referrer URL is blacklisted as spam.");
}
}

if (!$excluded) {
if ($this->isPrefetchDetected()) {
$excluded = true;
Expand Down Expand Up @@ -256,6 +264,7 @@ protected function isReferrerSpamExcluded()
$referrerUrl = $this->request->getParam('urlref');
foreach($spamHosts as $spamHost) {
if( strpos($referrerUrl, $spamHost) !== false) {
Common::printDebug('Referrer URL is a known spam: ' . $spamHost);
return true;
}
}
Expand Down

0 comments on commit acb1bc2

Please sign in to comment.