Преглед на файлове

extend URL validation

this code is currently dead, but improving it should it become live
Hawkheart преди 6 години
родител
ревизия
88d2488d08
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  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) {