Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2018-09-24 01:06:50 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2018-09-24 01:06:50 +0300
commitaf9f44ced0a8d2e703584eaaffc210f2a1a30187 (patch)
treefe82361c4afad9ea4847d2879851be2f579b1807 /plugins/Goals
parentcf203be455df68192580bd7363886d5604abae80 (diff)
Fix fatal when multiple sites are requested in referrers API report (#13439)
* Fix fatal when multiple sites are requested in referrers API report * add more checks
Diffstat (limited to 'plugins/Goals')
-rw-r--r--plugins/Goals/API.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php
index 072f1b9b8e..5fbe256698 100644
--- a/plugins/Goals/API.php
+++ b/plugins/Goals/API.php
@@ -86,6 +86,9 @@ class API extends \Piwik\Plugin\API
$cacheId = self::getCacheId($idSite);
$cache = $this->getGoalsInfoStaticCache();
if (!$cache->contains($cacheId)) {
+ // note: the reason this is secure is because the above cache is a static cache and cleared after each request
+ // if we were to use a different cache that persists the result, this would not be secure because when a
+ // result is in the cache, it would just return the result
$idSite = Site::getIdSitesFromIdSitesString($idSite);
if (empty($idSite)) {