Browse Source

Merge pull request #1120 from Hawkheart/patch-1

extend URL validation
daniel 6 years ago
parent
commit
1347bb618d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php

+ 5 - 0
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) {