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:
Diffstat (limited to 'tests/PHPUnit/Integration/ReleaseCheckListTest.php')
-rw-r--r--tests/PHPUnit/Integration/ReleaseCheckListTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/ReleaseCheckListTest.php b/tests/PHPUnit/Integration/ReleaseCheckListTest.php
index 22373832d9..7994026a63 100644
--- a/tests/PHPUnit/Integration/ReleaseCheckListTest.php
+++ b/tests/PHPUnit/Integration/ReleaseCheckListTest.php
@@ -696,6 +696,31 @@ class ReleaseCheckListTest extends \PHPUnit\Framework\TestCase
. implode(', ', $filesThatDoNotExist));
}
+ public function test_noVueHtmlWithoutSanitize()
+ {
+ $command = 'grep -r "v-html=" ' . PIWIK_INCLUDE_PATH . '/plugins --include=*.vue | grep -v "v-html=[\'\\"]\\$sanitize"';
+ $output = shell_exec($command);
+
+ $errorMessage = "";
+ if (!empty($output)) {
+ $lines = explode("\n", $output);
+
+ $files = [];
+ foreach ($lines as $line) {
+ if (empty(trim($line))) {
+ continue;
+ }
+
+ list($file, $match) = explode(':', $line);
+ $files[] = '- ' . trim($file);
+ }
+
+ $errorMessage = "Found uses of v-html without \$sanitize:\n" . implode("\n", $files);
+ }
+
+ $this->assertEmpty($output, $errorMessage);
+ }
+
/**
* @param $file
* @return bool