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/UserCountry
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/UserCountry')
-rw-r--r--plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php4
-rw-r--r--plugins/UserCountry/LocationProvider/DefaultProvider.php2
-rw-r--r--plugins/UserCountry/LocationProvider/GeoIp/Pecl.php2
-rw-r--r--plugins/UserCountry/LocationProvider/GeoIp/Php.php2
-rw-r--r--plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php4
-rw-r--r--plugins/UserCountry/Reports/Base.php8
-rw-r--r--plugins/UserCountry/Reports/GetCountry.php2
-rw-r--r--plugins/UserCountry/templates/adminIndex.twig2
8 files changed, 13 insertions, 13 deletions
diff --git a/plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php b/plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php
index fa6497c199..52a648e270 100644
--- a/plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php
+++ b/plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php
@@ -56,12 +56,12 @@ class GeolocationDiagnostic implements Diagnostic
$comment = $this->translator->translate('UserCountry_GeoIpLocationProviderNotRecomnended') . ' ';
$message = Manager::getInstance()->isPluginActivated('GeoIp2') ? 'GeoIp2_LocationProviderDesc_ServerModule2' : 'UserCountry_GeoIpLocationProviderDesc_ServerBased2';
$comment .= $this->translator->translate($message, array(
- '<a href="https://matomo.org/docs/geo-locate/" rel="noreferrer" target="_blank">', '', '', '</a>'
+ '<a href="https://matomo.org/docs/geo-locate/" rel="noreferrer noopener" target="_blank">', '', '', '</a>'
));
} else {
$comment = $this->translator->translate('UserCountry_DefaultLocationProviderDesc1') . ' ';
$comment .= $this->translator->translate('UserCountry_DefaultLocationProviderDesc2', array(
- '<a href="https://matomo.org/docs/geo-locate/" rel="noreferrer" target="_blank">', '', '', '</a>'
+ '<a href="https://matomo.org/docs/geo-locate/" rel="noreferrer noopener" target="_blank">', '', '', '</a>'
));
}
diff --git a/plugins/UserCountry/LocationProvider/DefaultProvider.php b/plugins/UserCountry/LocationProvider/DefaultProvider.php
index b5b32ec8c2..32be534a7b 100644
--- a/plugins/UserCountry/LocationProvider/DefaultProvider.php
+++ b/plugins/UserCountry/LocationProvider/DefaultProvider.php
@@ -104,7 +104,7 @@ class DefaultProvider extends LocationProvider
$desc = Piwik::translate('UserCountry_DefaultLocationProviderDesc1') . ' '
. Piwik::translate('UserCountry_DefaultLocationProviderDesc2',
array('<strong>', '', '', '</strong>'))
- . '<p><a href="https://matomo.org/faq/how-to/#faq_163" rel="noreferrer" target="_blank">'
+ . '<p><a href="https://matomo.org/faq/how-to/#faq_163" rel="noreferrer noopener" target="_blank">'
. Piwik::translate('UserCountry_HowToInstallGeoIPDatabases')
. '</a></p>';
return array('id' => self::ID, 'title' => self::TITLE, 'description' => $desc, 'order' => 1);
diff --git a/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php b/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php
index 8171485e42..0fc7c32cd5 100644
--- a/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php
+++ b/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php
@@ -217,7 +217,7 @@ class Pecl extends GeoIp
{
$desc = Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Pecl1') . '<br/><br/>'
. Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Pecl2');
- $installDocs = '<a rel="noreferrer" target="_blank" href="https://matomo.org/faq/how-to/#faq_164">'
+ $installDocs = '<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/how-to/#faq_164">'
. Piwik::translate('UserCountry_HowToInstallGeoIpPecl')
. '</a>';
diff --git a/plugins/UserCountry/LocationProvider/GeoIp/Php.php b/plugins/UserCountry/LocationProvider/GeoIp/Php.php
index db274f6bf7..1969376edc 100644
--- a/plugins/UserCountry/LocationProvider/GeoIp/Php.php
+++ b/plugins/UserCountry/LocationProvider/GeoIp/Php.php
@@ -324,7 +324,7 @@ class Php extends GeoIp
$desc = Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Php1') . '<br/><br/>'
. Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Php2',
array('<strong>', '</strong>', '<strong>', '</strong>'));
- $installDocs = '<a rel="noreferrer" target="_blank" href="https://matomo.org/faq/how-to/#faq_163">'
+ $installDocs = '<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/how-to/#faq_163">'
. Piwik::translate('UserCountry_HowToInstallGeoIPDatabases')
. '</a>';
diff --git a/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php b/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php
index 2a597bd030..08e1f6d298 100644
--- a/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php
+++ b/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php
@@ -223,10 +223,10 @@ class ServerBased extends GeoIp
. Piwik::translate('UserCountry_GeoIpLocationProviderDesc_ServerBased2',
array('<strong>', '</strong>', '<strong>', '</strong>'));
$installDocs =
- '<a rel="noreferrer" target="_blank" href="https://matomo.org/faq/how-to/#faq_165">'
+ '<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/how-to/#faq_165">'
. Piwik::translate('UserCountry_HowToInstallApacheModule')
. '</a><br/>'
- . '<a rel="noreferrer" target="_blank" href="https://matomo.org/faq/how-to/#faq_166">'
+ . '<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/how-to/#faq_166">'
. Piwik::translate('UserCountry_HowToInstallNginxModule')
. '</a>';
diff --git a/plugins/UserCountry/Reports/Base.php b/plugins/UserCountry/Reports/Base.php
index 7a6166dec4..ac02c16a6d 100644
--- a/plugins/UserCountry/Reports/Base.php
+++ b/plugins/UserCountry/Reports/Base.php
@@ -23,9 +23,9 @@ abstract class Base extends \Piwik\Plugin\Report
protected function getGeoIPReportDocSuffix()
{
return Piwik::translate('UserCountry_GeoIPDocumentationSuffix',
- array('<a rel="noreferrer" target="_blank" href="http://www.maxmind.com/?rId=piwik">',
+ array('<a rel="noreferrer noopener" target="_blank" href="http://www.maxmind.com/?rId=piwik">',
'</a>',
- '<a rel="noreferrer" target="_blank" href="http://www.maxmind.com/en/city_accuracy?rId=piwik">',
+ '<a rel="noreferrer noopener" target="_blank" href="http://www.maxmind.com/en/city_accuracy?rId=piwik">',
'</a>')
);
}
@@ -50,11 +50,11 @@ abstract class Base extends \Piwik\Plugin\Report
$footerMessage .= ' ' . Piwik::translate('UserCountry_NoDataForGeoIPReport2',
array('<a target="_blank" href="' . Url::getCurrentQueryStringWithParametersModified($params) . '">',
'</a>',
- '<a rel="noreferrer" target="_blank" href="http://dev.maxmind.com/geoip/geolite?rId=piwik">',
+ '<a rel="noreferrer noopener" target="_blank" href="http://dev.maxmind.com/geoip/geolite?rId=piwik">',
'</a>'));
} else {
$footerMessage .= ' ' . Piwik::translate('UserCountry_ToGeolocateOldVisits',
- array('<a rel="noreferrer" target="_blank" href="https://matomo.org/faq/how-to/#faq_167">', '</a>'));
+ array('<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/how-to/#faq_167">', '</a>'));
}
$view->config->show_footer_message = $footerMessage;
diff --git a/plugins/UserCountry/Reports/GetCountry.php b/plugins/UserCountry/Reports/GetCountry.php
index f3e8f2fcd3..5ea33cdced 100644
--- a/plugins/UserCountry/Reports/GetCountry.php
+++ b/plugins/UserCountry/Reports/GetCountry.php
@@ -39,7 +39,7 @@ class GetCountry extends Base
// if we're using the default location provider, add a note explaining how it works
$footerMessage = Piwik::translate("General_Note") . ': '
. Piwik::translate('UserCountry_DefaultLocationProviderExplanation',
- array('<a rel="noreferrer" target="_blank" href="https://matomo.org/docs/geo-locate/">', '</a>'));
+ array('<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/docs/geo-locate/">', '</a>'));
$view->config->show_footer_message = $footerMessage;
}
diff --git a/plugins/UserCountry/templates/adminIndex.twig b/plugins/UserCountry/templates/adminIndex.twig
index ea26230f5f..1a093612b0 100644
--- a/plugins/UserCountry/templates/adminIndex.twig
+++ b/plugins/UserCountry/templates/adminIndex.twig
@@ -18,7 +18,7 @@
<h3 style="margin-top:0;">{{ 'UserCountry_HowToSetupGeoIP'|translate }}</h3>
<p>{{ 'UserCountry_HowToSetupGeoIPIntro'|translate }}</p>
<ul style="list-style:disc !important;margin-left:2em;">
- <li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step1'|translate('<a href="'~geoLiteUrl~'">','</a>','<a rel="noreferrer" target="_blank" href="http://www.maxmind.com/?rId=piwik">','</a>')|raw }}</li>
+ <li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step1'|translate('<a rel="noreferrer noopener" href="'~geoLiteUrl~'">','</a>','<a rel="noreferrer noopener" target="_blank" href="http://www.maxmind.com/?rId=piwik">','</a>')|raw }}</li>
<li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step2'|translate("'"~geoLiteFilename~"'",'<strong>','</strong>')|raw }}</li>
<li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step3'|translate('<strong>','</strong>','<span style="color:green"><strong>','</strong></span>')|raw }}</li>
<li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step4'|translate }}</li>