Skip to content
Extraits de code Groupes Projets
Valider f21fd3ee rédigé par robocoder's avatar robocoder
Parcourir les fichiers

refs #2048 - remove config setting; enabling/disabling DNT corresponds to...

refs #2048 - remove config setting; enabling/disabling DNT corresponds to activating/deactivating the plugin

git-svn-id: http://dev.piwik.org/svn/trunk@6204 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 7a4ff924
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -350,9 +350,6 @@ page_maximum_length = 1024; ...@@ -350,9 +350,6 @@ page_maximum_length = 1024;
; For IPv4 addresses, valid values are 0..4; for IPv6 addresses, valid values are 0..16 ; For IPv4 addresses, valid values are 0..4; for IPv6 addresses, valid values are 0..16
ip_address_mask_length = 1 ip_address_mask_length = 1
; Ignore visits with X-Do-Not-Track or DNT header
do_not_track = 1
; DO NOT USE THIS SETTING ON PUBLICLY AVAILABLE PIWIK SERVER ; DO NOT USE THIS SETTING ON PUBLICLY AVAILABLE PIWIK SERVER
; !!! Security risk: if set to 0, it would allow anyone to push data to Piwik with custom dates in the past/future and with fake IPs !!! ; !!! Security risk: if set to 0, it would allow anyone to push data to Piwik with custom dates in the past/future and with fake IPs !!!
; When using the Tracking API, to override either the datetime and/or the visitor IP, ; When using the Tracking API, to override either the datetime and/or the visitor IP,
......
...@@ -47,10 +47,8 @@ class Piwik_DoNotTrack extends Piwik_Plugin ...@@ -47,10 +47,8 @@ class Piwik_DoNotTrack extends Piwik_Plugin
function checkHeader($notification) function checkHeader($notification)
{ {
$setting = @Piwik_Config::getInstance()->Tracker['do_not_track']; if((isset($_SERVER['HTTP_X_DO_NOT_TRACK']) && $_SERVER['HTTP_X_DO_NOT_TRACK'] === '1')
if($setting === '1' && || (isset($_SERVER['HTTP_DNT']) && substr($_SERVER['HTTP_DNT'], 0, 1) === '1'))
((isset($_SERVER['HTTP_X_DO_NOT_TRACK']) && $_SERVER['HTTP_X_DO_NOT_TRACK'] === '1') ||
(isset($_SERVER['HTTP_DNT']) && substr($_SERVER['HTTP_DNT'], 0, 1) === '1')))
{ {
$exclude =& $notification->getNotificationObject(); $exclude =& $notification->getNotificationObject();
$exclude = true; $exclude = true;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter