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:
authorThomas Steur <tsteur@users.noreply.github.com>2020-09-28 22:49:43 +0300
committerGitHub <noreply@github.com>2020-09-28 22:49:43 +0300
commit827c74be47b66c3e4c32e4e1b3925c64aab467ef (patch)
treee966e0b251cf259ef1e9cbf6ff755c78f43fb62e /plugins/GeoIp2
parent82d554dbf74db748565d7a8ab93566a6acc7039b (diff)
Help user configure correct url by checking for protocol (#16463)
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r--plugins/GeoIp2/GeoIP2AutoUpdater.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/GeoIp2/GeoIP2AutoUpdater.php b/plugins/GeoIp2/GeoIP2AutoUpdater.php
index 3f2b7b1baf..8282005c28 100644
--- a/plugins/GeoIp2/GeoIP2AutoUpdater.php
+++ b/plugins/GeoIp2/GeoIP2AutoUpdater.php
@@ -406,7 +406,9 @@ class GeoIP2AutoUpdater extends Task
$url = $options[$optionKey];
$url = self::removeDateFromUrl($url);
-
+ if (!empty($url) && strpos(Common::mb_strtolower($url), 'https://') !== 0 && strpos(Common::mb_strtolower($url), 'http://') !== 0) {
+ throw new Exception('Invalid download URL for geoip ' . $optionKey . ': ' . $url);
+ }
Option::set($optionName, $url);
}