mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:02:58 +00:00
Merge pull request #6456 from annando/long-url
This fixes a problem when the URL is too long
This commit is contained in:
commit
09a44b3039
1 changed files with 5 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue