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:
authorStefan Giehl <stefan@piwik.org>2017-06-26 14:03:46 +0300
committerGitHub <noreply@github.com>2017-06-26 14:03:46 +0300
commit1d5bbb55a4ffdfa9c40ba68a8680a7208e26adb4 (patch)
tree7ef7752fd18e1906ec9bbce3429bed2fa973426c /plugins/Events
parent40a8c0bdc4272755bf7e595d5029665a68c84c60 (diff)
Disallow event tracking with empty/whitespace categories (#11819)
* trim event values before checking if they are empty * Prevent possible archiving failures for already tracked empty event categories * Throw exception when tracking events with empty category or action * move trim method * Log console error when tracking events without category or action * rebuilt piwik.js
Diffstat (limited to 'plugins/Events')
-rw-r--r--plugins/Events/Columns/EventAction.php3
-rw-r--r--plugins/Events/Columns/EventCategory.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Events/Columns/EventAction.php b/plugins/Events/Columns/EventAction.php
index 79b3b5867b..1e19061979 100644
--- a/plugins/Events/Columns/EventAction.php
+++ b/plugins/Events/Columns/EventAction.php
@@ -8,6 +8,7 @@
*/
namespace Piwik\Plugins\Events\Columns;
+use Piwik\Exception\InvalidRequestParameterException;
use Piwik\Piwik;
use Piwik\Plugin\Dimension\ActionDimension;
use Piwik\Plugins\Events\Segment;
@@ -51,6 +52,6 @@ class EventAction extends ActionDimension
return $eventAction;
}
- return false;
+ throw new InvalidRequestParameterException('Param `e_a` must not be empty or filled with whitespaces');
}
} \ No newline at end of file
diff --git a/plugins/Events/Columns/EventCategory.php b/plugins/Events/Columns/EventCategory.php
index 7c6b5fd02a..f74f785a3c 100644
--- a/plugins/Events/Columns/EventCategory.php
+++ b/plugins/Events/Columns/EventCategory.php
@@ -8,6 +8,7 @@
*/
namespace Piwik\Plugins\Events\Columns;
+use Piwik\Exception\InvalidRequestParameterException;
use Piwik\Piwik;
use Piwik\Plugin\Dimension\ActionDimension;
use Piwik\Plugins\Events\Segment;
@@ -51,6 +52,6 @@ class EventCategory extends ActionDimension
return $eventCategory;
}
- return false;
+ throw new InvalidRequestParameterException('Param `e_c` must not be empty or filled with whitespaces');
}
} \ No newline at end of file