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:
authorLukas Winkler <github@lw1.at>2018-10-10 22:12:07 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2018-10-10 22:12:07 +0300
commit3634010ad7d069dca23741429ff57c71f3a690c9 (patch)
treec4e2c3eb847f59b83f4e42e53ff41fe6c13baf60 /plugins/SEO
parent4fbead1a302205aa6472116cf56ed9194b9cdebe (diff)
don't allow SEO plugin to make non-HTTPS requests (#13575)
Diffstat (limited to 'plugins/SEO')
-rw-r--r--plugins/SEO/Metric/Alexa.php4
-rw-r--r--plugins/SEO/Metric/Bing.php2
-rw-r--r--plugins/SEO/Metric/DomainAge.php6
3 files changed, 3 insertions, 9 deletions
diff --git a/plugins/SEO/Metric/Alexa.php b/plugins/SEO/Metric/Alexa.php
index 7192113886..bf0b999659 100644
--- a/plugins/SEO/Metric/Alexa.php
+++ b/plugins/SEO/Metric/Alexa.php
@@ -17,8 +17,8 @@ use Psr\Log\LoggerInterface;
*/
class Alexa implements MetricsProvider
{
- const URL = 'http://data.alexa.com/data?cli=10&url=';
- const LINK = 'http://www.alexa.com/siteinfo/';
+ const URL = 'https://data.alexa.com/data?cli=10&url=';
+ const LINK = 'https://www.alexa.com/siteinfo/';
/**
* @var LoggerInterface
diff --git a/plugins/SEO/Metric/Bing.php b/plugins/SEO/Metric/Bing.php
index 0c2892fb93..e5ced1ad30 100644
--- a/plugins/SEO/Metric/Bing.php
+++ b/plugins/SEO/Metric/Bing.php
@@ -17,7 +17,7 @@ use Psr\Log\LoggerInterface;
*/
class Bing implements MetricsProvider
{
- const URL = 'http://www.bing.com/search?setlang=en-US&rdr=1&q=site%3A';
+ const URL = 'https://www.bing.com/search?setlang=en-US&rdr=1&q=site%3A';
/**
* @var LoggerInterface
diff --git a/plugins/SEO/Metric/DomainAge.php b/plugins/SEO/Metric/DomainAge.php
index c11a222011..855e0ada67 100644
--- a/plugins/SEO/Metric/DomainAge.php
+++ b/plugins/SEO/Metric/DomainAge.php
@@ -131,12 +131,6 @@ class DomainAge implements MetricsProvider
try {
return $this->getHttpResponse($url);
} catch (\Exception $e) {
- }
-
- $httpUrl = str_replace('https://', 'http://', $url);
- try {
- return $this->getHttpResponse($httpUrl);
- } catch (\Exception $e) {
$this->logger->warning('Error while getting SEO stats (domain age): {message}', array('message' => $e->getMessage()));
return '';
}