https://reisub.nsupdate.info/git
/
friendica-addons.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db6d5dd
)
[mailstream] Check for malformed image URLs and do not attempt to attach them
author
Matthew Exon
<github.mexon@spamgourmet.com>
Sun, 29 Sep 2019 20:22:52 +0000
(22:22 +0200)
committer
Matthew Exon
<github.mexon@spamgourmet.com>
Sun, 29 Sep 2019 20:23:10 +0000
(22:23 +0200)
mailstream/mailstream.php
patch
|
blob
|
history
diff --git
a/mailstream/mailstream.php
b/mailstream/mailstream.php
index
563dd90
..
a58dfc1
100644
(file)
--- a/
mailstream/mailstream.php
+++ b/
mailstream/mailstream.php
@@
-166,6
+166,9
@@
function mailstream_do_images($a, &$item, &$attachments) {
preg_match_all("/\[img\=([^\]]*)\]([^[]*)\[\/img\]/ism", $item["body"], $matches3);
foreach (array_merge($matches1[3], $matches2[1], $matches3[1]) as $url) {
$components = parse_url($url);
+ if (!$components) {
+ continue;
+ }
$cookiejar = tempnam(get_temppath(), 'cookiejar-mailstream-');
$curlResult = Network::fetchUrlFull($url, true, 0, '', $cookiejar);
$attachments[$url] = [