From: Marcel Werk Date: Wed, 13 Jul 2016 15:13:16 +0000 (+0200) Subject: Fixed handling of invalid urls X-Git-Tag: 3.0.0_Beta_1~1163 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f8ee98c60d517451419faf09ac946c66694be3c5;p=GitHub%2FWoltLab%2FWCF.git Fixed handling of invalid urls --- diff --git a/wcfsetup/install/files/lib/util/HTTPRequest.class.php b/wcfsetup/install/files/lib/util/HTTPRequest.class.php index 7c239438d6..3ac741b96c 100644 --- a/wcfsetup/install/files/lib/util/HTTPRequest.class.php +++ b/wcfsetup/install/files/lib/util/HTTPRequest.class.php @@ -217,6 +217,9 @@ final class HTTPRequest { */ private function setURL($url) { $parsedUrl = $originUrl = parse_url($url); + if (empty($originUrl['scheme']) || empty($originUrl['host'])) { + throw new SystemException("Invalid URL '{$url}' given"); + } $this->originUseSSL = $originUrl['scheme'] === 'https'; $this->originHost = $originUrl['host'];