From 053ff36abf58a2be72ec1f67c9ebac17fcecdb5d Mon Sep 17 00:00:00 2001 From: Justin Velluppillai Date: Fri, 25 Jun 2021 20:26:04 +1200 Subject: Web cron archive - allow POST'd token_auth (#17703) * Web cron archive - allow POST'd token_auth * Explicitly check for empty string Co-authored-by: Stefan Giehl Co-authored-by: Stefan Giehl --- misc/cron/archive.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'misc') diff --git a/misc/cron/archive.php b/misc/cron/archive.php index e7ac710d14..c7846adb2e 100644 --- a/misc/cron/archive.php +++ b/misc/cron/archive.php @@ -54,7 +54,7 @@ try 'php archive.php --url=http://your.piwik/path' $_GET['method'] = 'CoreAdminHome.runCronArchiving'; $_GET['format'] = 'console'; // will use Content-type text/plain - if(!isset($_GET['token_auth'])) { + if('' === Piwik\Common::getRequestVar('token_auth', '', 'string')) { echo " You must specify the Super User token_auth as a parameter to this script, eg. ?token_auth=XYZ if you wish to run this script through the browser.
However it is recommended to run it via cron in the command line, since it can take a long time to run.
@@ -65,4 +65,4 @@ In a shell, execute for example the following to trigger archiving on the local } require_once PIWIK_INCLUDE_PATH . "/index.php"; -} \ No newline at end of file +} -- cgit v1.2.3