From 88d2488d08ab34f28126fa4f30e19fa39e9cd882 Mon Sep 17 00:00:00 2001 From: Hawkheart Date: Thu, 4 Apr 2019 00:50:48 -0400 Subject: [PATCH] extend URL validation this code is currently dead, but improving it should it become live --- app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php b/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php index 90c592c5c..0d8dcffb3 100644 --- a/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php +++ b/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php @@ -186,6 +186,11 @@ class RemoteFollowImportRecent implements ShouldQueue Log::info('Invalid media, skipping. '.$mime); continue; } + if (Helpers::validateUrl($url) == false) { + Log::info('Skipping invalid attachment URL: ' . $url); + continue; + } + $count++; if ($count === 1) {