소스 검색

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) {