From ce37e981cb74cdf62971d979957991e20c1eaf73 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 16 Jan 2019 22:34:57 +0000 Subject: [PATCH] This fixes a problem when the URL is too long --- src/Util/Network.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Util/Network.php b/src/Util/Network.php index 0acad3e082..d4e18a8a63 100644 --- a/src/Util/Network.php +++ b/src/Util/Network.php @@ -96,6 +96,11 @@ class Network $a = \get_app(); + if (strlen($url) > 1000) { + Logger::log('URL is longer than 1000 characters. Callstack: ' . System::callstack(20), Logger::DEBUG); + return CurlResult::createErrorCurl(substr($url, 0, 200)); + } + $parts = parse_url($url); $path_parts = explode('/', defaults($parts, 'path', '')); foreach ($path_parts as $part) {