1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00

Fix pleroma bug with invalid urls

This commit is contained in:
Daniel Supernault 2018-11-03 21:22:45 -06:00
parent 7dc1bc7d9f
commit c710effcd4
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -207,6 +207,7 @@ class RemoteFollowImportRecent implements ShouldQueue
try {
$info = pathinfo($url);
$url = str_replace(' ', '%20', $url);
$img = file_get_contents($url);
$file = '/tmp/'.str_random(12).$info['basename'];
file_put_contents($file, $img);