diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-09-28 22:49:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 22:49:43 +0300 |
commit | 827c74be47b66c3e4c32e4e1b3925c64aab467ef (patch) | |
tree | e966e0b251cf259ef1e9cbf6ff755c78f43fb62e /plugins/GeoIp2 | |
parent | 82d554dbf74db748565d7a8ab93566a6acc7039b (diff) |
Help user configure correct url by checking for protocol (#16463)
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r-- | plugins/GeoIp2/GeoIP2AutoUpdater.php | 4 |
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); } |