diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-12-08 01:22:45 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-12-08 01:22:45 +0300 |
commit | 80bfa679076849f9056ef2fca1131d060cd67370 (patch) | |
tree | 725c590f32f0da1cb46f63bff096ac563e32fab6 /misc/cron/archive.php | |
parent | 56b9f7b384ee2161e9f51c3f491c1461c2d7c424 (diff) |
fixes #6823 When there are several Super Users in Piwik, archive.php web cron should accept any of those Super User tokens
Diffstat (limited to 'misc/cron/archive.php')
-rw-r--r-- | misc/cron/archive.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php index 3975f90bea..28438cfa72 100644 --- a/misc/cron/archive.php +++ b/misc/cron/archive.php @@ -60,9 +60,8 @@ if (isset($_SERVER['argv']) && Piwik\Console::isSupported()) { if (!Piwik\Common::isPhpCliMode()) { $token_auth = Piwik\Common::getRequestVar('token_auth', '', 'string'); - if ($token_auth !== $archiver->getTokenAuth() - || strlen($token_auth) != 32 - ) { + if (!$archiver->isTokenAuthSuperUserToken($token_auth)) { + var_dump($token_auth); die('<b>You must specify the Super User token_auth as a parameter to this script, eg. <code>?token_auth=XYZ</code> if you wish to run this script through the browser. </b><br> However it is recommended to run it <a href="http://piwik.org/docs/setup-auto-archiving/">via cron in the command line</a>, since it can take a long time to run.<br/> In a shell, execute for example the following to trigger archiving on the local Piwik server:<br/> |