Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-05-01 04:54:36 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-05-01 04:54:36 +0400
commit6c8480836a83f52a23eb9a05113d42dee063d89f (patch)
tree68e5c34ed7d2451b30d497a1b73f454a98f07f85 /core
parent0fc4997e3d686e20ab32aa0959a137909e8d2d4d (diff)
fixed #686 spam live bot when IP coming from microsoft now excluded..
Diffstat (limited to 'core')
-rw-r--r--core/Tracker/Visit.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index 1286beac54..e317de67f2 100644
--- a/core/Tracker/Visit.php
+++ b/core/Tracker/Visit.php
@@ -252,6 +252,16 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
$country = Piwik_Common::getCountry($userInfo['location_browser_lang'], $enableLanguageToCountryGuess = Piwik_Tracker_Config::getInstance()->Tracker['enable_language_to_country_guess']);
$refererInfo = $this->getRefererInformation();
+ $userInfo['location_ip'] = ip2long('65.55.110.40');
+
+ // if the referer is Live! we check if the IP comes from microsoft
+ // we don't count their cloak checks requests (which really is "Live referer spam") see #686
+ if($refererInfo['referer_name'] == "Live"
+ && preg_match("/^65\.55/", long2ip($userInfo['location_ip'])))
+ {
+ throw new Exception("Spam Live bot, go away, you're making me cry");
+ }
+
/**
* Save the visitor
*/