diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-12-17 06:38:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 06:38:58 +0300 |
commit | 7edc2c9864f1b2fe43324f247ea82564d1112319 (patch) | |
tree | d9417a43af5f33ec2b12b1404bfc616eefd561f5 /core | |
parent | 9e6094647e7151ba00e34ae234d4f6890ab52c2e (diff) |
Apparently the segment needs to be double encoded when sent in the climulti:request command. (#16947)
* Apparently the segment needs to be double encoded when sent in the climulti:request command.
* add test
* add expected
* fix test
Diffstat (limited to 'core')
-rw-r--r-- | core/CronArchive.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php index 477720a892..790a0cb552 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -561,7 +561,7 @@ class CronArchive $visits = (int) $visits; $this->logger->info("Archived website id {$params['idSite']}, period = {$params['period']}, date = " - . "{$params['date']}, segment = '" . (isset($params['segment']) ? $params['segment'] : '') . "', " + . "{$params['date']}, segment = '" . (isset($params['segment']) ? urldecode($params['segment']) : '') . "', " . ($plugin ? "plugin = $plugin, " : "") . ($report ? "report = $report, " : "") . "$visits visits found. $timer"); } @@ -654,7 +654,7 @@ class CronArchive { $request = "?module=API&method=CoreAdminHome.archiveReports&idSite=$idSite&period=$period&date=" . $date . "&format=json"; if ($segment) { - $request .= '&segment=' . urlencode($segment); + $request .= '&segment=' . urlencode(urlencode($segment)); } if (!empty($plugin)) { $request .= "&plugin=" . $plugin; |