https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f13b8f8
)
This fixes a problem when the URL is too long
author
Michael
<heluecht@pirati.ca>
Wed, 16 Jan 2019 22:34:57 +0000
(22:34 +0000)
committer
Michael
<heluecht@pirati.ca>
Wed, 16 Jan 2019 22:34:57 +0000
(22:34 +0000)
src/Util/Network.php
patch
|
blob
|
history
diff --git
a/src/Util/Network.php
b/src/Util/Network.php
index
0acad3e
..
d4e18a8
100644
(file)
--- 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) {