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:
authorChristian Schmidt <github@chsc.dk>2018-07-25 22:47:29 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2018-07-25 22:47:29 +0300
commite09383ebeedd6b6f8dee8b57373027b00e6203b5 (patch)
tree3d0faed73ba8629a52a000147b99396239cdd0ba /plugins/Marketplace
parentef9c48cc48587776107b1500dc14eef3ffa19154 (diff)
Replace proxy redirect with rel=noreferrer (#12780)
* Replace proxy redirect with rel=noreferrer * Add noopener * Restore action=redirect for non-Matomo links * Wrap referring URLs * NO target on download link * Fix Github links * Fix whitespace * Fix tests * Revert change * Revert changes * Fix tests * Add noreferrer shim for MSIE 10 * Remove all action=redirect links * Restore noreferrer * Restore test * Fix one more occurrence * Update changelog * Combine if's * Fix changelog wording * Fix stray whitespace
Diffstat (limited to 'plugins/Marketplace')
-rw-r--r--plugins/Marketplace/Plugins/InvalidLicenses.php2
-rw-r--r--plugins/Marketplace/templates/licenseform.twig4
-rw-r--r--plugins/Marketplace/templates/overview.twig12
-rw-r--r--plugins/Marketplace/templates/plugin-details.twig14
-rw-r--r--plugins/Marketplace/templates/subscription-overview.twig6
-rw-r--r--plugins/Marketplace/tests/Integration/Plugins/InvalidLicensesTest.php10
6 files changed, 24 insertions, 24 deletions
diff --git a/plugins/Marketplace/Plugins/InvalidLicenses.php b/plugins/Marketplace/Plugins/InvalidLicenses.php
index 2ecd469de6..fede02cedd 100644
--- a/plugins/Marketplace/Plugins/InvalidLicenses.php
+++ b/plugins/Marketplace/Plugins/InvalidLicenses.php
@@ -159,7 +159,7 @@ class InvalidLicenses
return '';
}
- return '<a href="' . $info['loginUrl'] . '" target="_blank" rel="noreferrer">';
+ return '<a href="' . $info['loginUrl'] . '" target="_blank" rel="noreferrer noopener">';
}
private function getSubscritionSummaryMessage()
diff --git a/plugins/Marketplace/templates/licenseform.twig b/plugins/Marketplace/templates/licenseform.twig
index ffa6da07e6..cbf31bb83e 100644
--- a/plugins/Marketplace/templates/licenseform.twig
+++ b/plugins/Marketplace/templates/licenseform.twig
@@ -49,7 +49,7 @@
{% else %}
{% if isSuperUser %}
- {{ 'Marketplace_PaidPluginsNoLicenseKeyIntro'|translate("<a target='_blank' href='?module=Proxy&action=redirect&url=https://matomo.org/recommends/premium-plugins/'>", "</a>")|raw }}
+ {{ 'Marketplace_PaidPluginsNoLicenseKeyIntro'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/recommends/premium-plugins/'>", "</a>")|raw }}
<br/>
@@ -60,7 +60,7 @@
<div piwik-activity-indicator loading="licenseController.isUpdating"></div>
{% else %}
- {{ 'Marketplace_PaidPluginsNoLicenseKeyIntroNoSuperUserAccess'|translate("<a target='_blank' href='?module=Proxy&action=redirect&url=https://matomo.org/recommends/premium-plugins/'>", "</a>")|raw }}
+ {{ 'Marketplace_PaidPluginsNoLicenseKeyIntroNoSuperUserAccess'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/recommends/premium-plugins/'>", "</a>")|raw }}
{% endif %}
{% endif %}
diff --git a/plugins/Marketplace/templates/overview.twig b/plugins/Marketplace/templates/overview.twig
index 7237fdb914..a8a0a2031b 100644
--- a/plugins/Marketplace/templates/overview.twig
+++ b/plugins/Marketplace/templates/overview.twig
@@ -70,16 +70,16 @@
{% include '@Marketplace/plugin-list.twig' %}
<div class="footer-message center">
- {{ 'Marketplace_DevelopersLearnHowToDevelopPlugins'|translate('<a href="?module=Proxy&action=redirect&url=https://developer.matomo.org/develop" target="_blank">', '</a>')|raw }}
+ {{ 'Marketplace_DevelopersLearnHowToDevelopPlugins'|translate('<a target="_blank" rel="noreferrer noopener" href="https://developer.matomo.org/develop">', '</a>')|raw }}
<br />
<br />
<br />
- <a rel="noreferrer" href="https://shop.matomo.org/faq/" target="_blank">FAQ</a> |
- <a rel="noreferrer" href="https://shop.matomo.org/terms-conditions/" target="_blank">Terms</a> |
- <a rel="noreferrer" href="https://matomo.org/privacy-policy/" target="_blank">Privacy</a> |
- <a rel="noreferrer" href="https://matomo.org/contact/" target="_blank">Contact</a>
+ <a rel="noreferrer noopener" href="https://shop.matomo.org/faq/" target="_blank">FAQ</a> |
+ <a rel="noreferrer noopener" href="https://shop.matomo.org/terms-conditions/" target="_blank">Terms</a> |
+ <a rel="noreferrer noopener" href="https://matomo.org/privacy-policy/" target="_blank">Privacy</a> |
+ <a rel="noreferrer noopener" href="https://matomo.org/contact/" target="_blank">Contact</a>
</div>
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
diff --git a/plugins/Marketplace/templates/plugin-details.twig b/plugins/Marketplace/templates/plugin-details.twig
index 1bd181647b..e939f67164 100644
--- a/plugins/Marketplace/templates/plugin-details.twig
+++ b/plugins/Marketplace/templates/plugin-details.twig
@@ -114,7 +114,7 @@
{% if plugin.consumer.loginUrl is defined and plugin.consumer.loginUrl %}
<a class="install update"
target="_blank"
- rel="noreferrer"
+ rel="noreferrer noopener"
href="{{ plugin.consumer.loginUrl|default('')|e('html_attr') }}"
>{{ 'Marketplace_UpgradeSubscription'|translate }}</a>
{% endif %}
@@ -136,12 +136,12 @@
<a class="install update addToCartLink" target="_blank"
title="{{ 'Marketplace_ClickToCompletePurchase'|translate|e('html_attr') }}"
- rel="noreferrer"
+ rel="noreferrer noopener"
href="{{ plugin.shop.url|default('')|e('html_attr') }}"
>{{ 'Marketplace_AddToCart'|translate }}</a>
{% else %}
<a class="install update" target="_blank"
- rel="noreferrer"
+ rel="noreferrer noopener"
href="{% if plugin.shop is defined and plugin.shop and plugin.shop.url %}{{ plugin.shop.url|e('html_attr') }}{% else %}{{ plugin.homepage|e('html_attr') }}{% endif %}"
>{{ 'General_MoreDetails'|translate }}</a>
{% endif %}
@@ -204,7 +204,7 @@
<dt>{{ 'Marketplace_License'|translate }}</dt>
<dd>
{% if latestVersion.license.url is defined and latestVersion.license.url %}
- <a rel="noreferrer"
+ <a rel="noreferrer noopener"
href="{{ latestVersion.license.url }}"
target="_blank">{{ latestVersion.license.name }}</a>
{% else %}
@@ -217,7 +217,7 @@
{% spaceless %}
{% if author.homepage %}
- <a target="_blank" rel="noreferrer" href="{{ author.homepage }}">{{ author.name }}</a>
+ <a target="_blank" rel="noreferrer noopener" href="{{ author.homepage }}">{{ author.name }}</a>
{% elseif author.email %}
<a href="mailto:{{ author.email|escape('url') }}">{{ author.name }}</a>
{% else %}
@@ -235,12 +235,12 @@
<dt>{{ 'CorePluginsAdmin_Websites'|translate }}</dt>
<dd>
{% if plugin.homepage %}
- <a target="_blank" rel="noreferrer" href="{{ plugin.homepage }}">{{ 'Marketplace_PluginWebsite'|translate }}</a>
+ <a target="_blank" rel="noreferrer noopener" href="{{ plugin.homepage }}">{{ 'Marketplace_PluginWebsite'|translate }}</a>
{%- endif -%}
{%- if plugin.changelog is defined and plugin.changelog and plugin.changelog.url is defined and plugin.changelog.url -%}
{%- if plugin.homepage %}, {% endif %}
- <a target="_blank" rel="noreferrer" href="{{ plugin.changelog.url }}">{{ 'CorePluginsAdmin_Changelog'|translate }}</a>
+ <a target="_blank" rel="noreferrer noopener" href="{{ plugin.changelog.url }}">{{ 'CorePluginsAdmin_Changelog'|translate }}</a>
{%- endif -%}
{%- if plugin.repositoryUrl %}, <a target="_blank" href="{{ plugin.repositoryUrl }}">GitHub</a>{% endif %}
diff --git a/plugins/Marketplace/templates/subscription-overview.twig b/plugins/Marketplace/templates/subscription-overview.twig
index 0ace015545..45c57f47e6 100644
--- a/plugins/Marketplace/templates/subscription-overview.twig
+++ b/plugins/Marketplace/templates/subscription-overview.twig
@@ -13,7 +13,7 @@
<p>
{{ 'Marketplace_PluginSubscriptionsList'|translate }}
{% if loginUrl %}
- <a target="_blank" rel="noreferrer" href="{{ loginUrl }}">{{ 'Marketplace_OverviewPluginSubscriptionsAllDetails'|translate }}</a>
+ <a target="_blank" rel="noreferrer noopener" href="{{ loginUrl }}">{{ 'Marketplace_OverviewPluginSubscriptionsAllDetails'|translate }}</a>
{% endif %}
<br/>
{{ 'Marketplace_OverviewPluginSubscriptionsMissingInfo'|translate }}
@@ -42,7 +42,7 @@
<tr>
<td class="subscriptionName">
{% if subscription.plugin.htmlUrl %}
- <a href="{{ subscription.plugin.htmlUrl }}" rel="noreferrer" target="_blank">
+ <a href="{{ subscription.plugin.htmlUrl }}" rel="noreferrer noopener" target="_blank">
{% endif %}
{{ subscription.plugin.displayName }}
@@ -98,4 +98,4 @@
{% endif %}
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
diff --git a/plugins/Marketplace/tests/Integration/Plugins/InvalidLicensesTest.php b/plugins/Marketplace/tests/Integration/Plugins/InvalidLicensesTest.php
index 28c748dee0..38d98c0da4 100644
--- a/plugins/Marketplace/tests/Integration/Plugins/InvalidLicensesTest.php
+++ b/plugins/Marketplace/tests/Integration/Plugins/InvalidLicensesTest.php
@@ -223,7 +223,7 @@ class InvalidLicensesTest extends IntegrationTestCase
$this->assertEquals('', $expired->getMessageExceededLicenses());
$this->assertEquals('', $expired->getMessageExpiredLicenses());
- $this->assertEquals('The following plugins have been deactivated because you are using them without a license: <strong>PaidPlugin1</strong>. <br/>To resolve this issue either update your license key, <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer">get a subscription now</a></strong> or deactivate the plugin. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageNoLicense());
+ $this->assertEquals('The following plugins have been deactivated because you are using them without a license: <strong>PaidPlugin1</strong>. <br/>To resolve this issue either update your license key, <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer noopener">get a subscription now</a></strong> or deactivate the plugin. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageNoLicense());
}
public function test_getMessageExceededLicenses_getMessageExpiredLicenses_invalidLicenses_PaidPluginActivated()
@@ -231,20 +231,20 @@ class InvalidLicensesTest extends IntegrationTestCase
$expired = $this->buildWithExpiredLicense();
$this->assertNull($expired->getMessageExceededLicenses());
- $this->assertEquals('The licenses for the following plugins are expired: <strong>PaidPlugin1</strong>. <br/>You will no longer receive any updates for these plugins. To resolve this issue either <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer">renew your subscription now</a></strong>, or deactivate the plugin if you no longer use it. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageExpiredLicenses());
+ $this->assertEquals('The licenses for the following plugins are expired: <strong>PaidPlugin1</strong>. <br/>You will no longer receive any updates for these plugins. To resolve this issue either <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer noopener">renew your subscription now</a></strong>, or deactivate the plugin if you no longer use it. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageExpiredLicenses());
}
public function test_getMessageExceededLicenses_getMessageExpiredLicenses_exceededLicenses_PaidPluginActivated()
{
$expired = $this->buildWithExceededLicense();
- $this->assertEquals('The licenses for the following plugins are no longer valid as the number of authorized users for the license is exceeded: <strong>PaidPlugin2</strong>. <br/>You will not be able to download updates for these plugins. To resolve this issue either delete some users or <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer">upgrade the subscription now</a></strong>. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageExceededLicenses());
- $this->assertEquals('The licenses for the following plugins are expired: <strong>PaidPlugin1</strong>. <br/>You will no longer receive any updates for these plugins. To resolve this issue either <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer">renew your subscription now</a></strong>, or deactivate the plugin if you no longer use it. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageExpiredLicenses());
+ $this->assertEquals('The licenses for the following plugins are no longer valid as the number of authorized users for the license is exceeded: <strong>PaidPlugin2</strong>. <br/>You will not be able to download updates for these plugins. To resolve this issue either delete some users or <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer noopener">upgrade the subscription now</a></strong>. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageExceededLicenses());
+ $this->assertEquals('The licenses for the following plugins are expired: <strong>PaidPlugin1</strong>. <br/>You will no longer receive any updates for these plugins. To resolve this issue either <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer noopener">renew your subscription now</a></strong>, or deactivate the plugin if you no longer use it. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageExpiredLicenses());
}
public function test_getMessageMissingLicenses_getMessageMissingLicenses_PaidPluginActivated()
{
$expired = $this->buildWithNoLicense();
- $this->assertEquals('The following plugins have been deactivated because you are using them without a license: <strong>PaidPlugin1</strong>. <br/>To resolve this issue either update your license key, <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer">get a subscription now</a></strong> or deactivate the plugin. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageNoLicense());
+ $this->assertEquals('The following plugins have been deactivated because you are using them without a license: <strong>PaidPlugin1</strong>. <br/>To resolve this issue either update your license key, <strong><a href="https://shop.piwik.org/my-account" target="_blank" rel="noreferrer noopener">get a subscription now</a></strong> or deactivate the plugin. <br/><a href="?module=Marketplace&action=subscriptionOverview">View your plugin subscriptions.</a>', $expired->getMessageNoLicense());
}
private function buildWithValidLicense()