From d40af20013e52a4354650db7aeabe7cdefb89af3 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 3 Apr 2019 13:24:27 -0600 Subject: [PATCH] Update RemoteFollow pipeline --- app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php b/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php index 00b0bc0a4..90c592c5c 100644 --- a/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php +++ b/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php @@ -16,6 +16,7 @@ use Illuminate\Queue\SerializesModels; use Log; use Storage; use Zttp\Zttp; +use App\Util\ActivityPub\Helpers; class RemoteFollowImportRecent implements ShouldQueue { @@ -60,9 +61,10 @@ class RemoteFollowImportRecent implements ShouldQueue public function fetchOutbox($url = false) { - Log::info(json_encode($url)); $url = ($url == false) ? $this->actor['outbox'] : $url; - + if(Helpers::validateUrl($url) == false) { + return; + } $response = Zttp::withHeaders([ 'User-Agent' => 'PixelFedBot v0.1 - https://pixelfed.org', ])->get($url);