https://github.com/matomo-org/matomo/commit/59698ee2a889ff321c53d526c4b3b61d9660ab4a - Mouve

Site d'origine

Permalink
Browse files

Rename Piwik -> Matomo in cookies (#16053)

  • Loading branch information
tsteur committed Jun 11, 2020
1 parent 192ba70 commit 59698ee2a889ff321c53d526c4b3b61d9660ab4a
@@ -18,7 +18,7 @@ purge old data. You can configure Matomo to automatically delete log data older

### Include a tracking Opt-Out feature on your site
In your website, we recommended providing an easy way for your visitors to “opt-out” of being tracked by Matomo.
You can use the Opt-Out feature to display a link your website that sets a special browser cookie (`piwik_ignore`) when
You can use the Opt-Out feature to display a link your website that sets a special browser cookie (`matomo_ignore`) when
clicked. Visitors that click that link will be ignored by Matomo in the future:
[How to include a tracking opt-out iframe.](https://matomo.org/docs/privacy/#step-3-include-a-web-analytics-opt-out-feature-on-your-site-using-an-iframe)

@@ -395,7 +395,7 @@
force_ssl = 0

; (DEPRECATED) has no effect
login_cookie_name = piwik_auth
login_cookie_name = matomo_auth

; By default, the auth cookie is set only for the duration of session.
; if "Remember me" is checked, the auth cookie will be valid for 14 days by default
@@ -825,7 +825,7 @@
scheduled_tasks_min_interval = 3600

; name of the cookie to ignore visits
ignore_visits_cookie_name = piwik_ignore
ignore_visits_cookie_name = matomo_ignore

; Comma separated list of variable names that will be read to define a Campaign name, for example CPC campaign
; Example: If a visitor first visits 'index.php?matomo_campaign=Adwords-CPC' then it will be counted as a campaign referrer named 'Adwords-CPC'
@@ -71,7 +71,7 @@ public static function start($options = false)
// incorrectly invalidate the session
@ini_set('session.referer_check', '');

// to preserve previous behavior piwik_auth provided when it contained a token_auth, we ensure
// to preserve previous behavior matomo_auth provided when it contained a token_auth, we ensure
// the session data won't be deleted until the cookie expires.
@ini_set('session.gc_maxlifetime', $config->General['login_cookie_expire']);

@@ -30,7 +30,7 @@
* against what is stored in the session. If it doesn't then this is a
* session hijacking attempt.
*
* We also check that a hash in the piwik_auth cookie matches the hash
* We also check that a hash in the matomo_auth cookie matches the hash
* of the time the user last changed their password + the session secret.
* If they don't match, the password has been changed since this session
* started, and is no longer valid.
@@ -48,6 +48,8 @@ public function getMigrations(Updater $updater)
], ['idinvalidation']);

$migrations[] = $this->migration->db->addIndex('archive_invalidations', ['idsite', 'date1', 'period'], 'index_idsite_dates_period_name');
// keep piwik_ignore for existing installs
$migrations[] = $this->migration->config->set('Tracker', 'ignore_visits_cookie_name', 'piwik_ignore');

return $migrations;
}
@@ -65,7 +65,7 @@ private function makeMockAuth($resultCode)

private function assertAuthCookieIsAbsent()
{
$this->assertArrayNotHasKey('piwik_auth', $_COOKIE);
$this->assertArrayNotHasKey('matomo_auth', $_COOKIE);
}

private function assertAuthCookieIsCreated(Cookie $cookie)
@@ -75,7 +75,7 @@ private function assertAuthCookieIsCreated(Cookie $cookie)

private function createAuthCookie()
{
$_COOKIE['piwik_auth'] = 'login=czo5OiJ0ZXN0bG9naW4iOw==:token_auth=czozMjoiOWU5MDYxZjk2MDI0YTY3NWFmOGFkNWZmNmNiZGY2ZGMiOw==';
$_COOKIE['matomo_auth'] = 'login=czo5OiJ0ZXN0bG9naW4iOw==:token_auth=czozMjoiOWU5MDYxZjk2MDI0YTY3NWFmOGFkNWZmNmNiZGY2ZGMiOw==';
}

private function assertAuthCookieIsDeleted(Cookie $cookie)

0 comments on commit 59698ee

Please sign in to comment.

Raccourcis

Commandes

Fermer