Merge pull request #6456 from annando/long-url

This fixes a problem when the URL is too long
This commit is contained in:
Tobias Diekershoff 2019-01-17 07:44:15 +01:00 committed by GitHub
commit 09a44b3039
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,6 +96,11 @@ class Network
$a = \get_app(); $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); $parts = parse_url($url);
$path_parts = explode('/', defaults($parts, 'path', '')); $path_parts = explode('/', defaults($parts, 'path', ''));
foreach ($path_parts as $part) { foreach ($path_parts as $part) {