diff options
Diffstat (limited to 'server/helpers/custom-validators/activitypub/videos.ts')
-rw-r--r-- | server/helpers/custom-validators/activitypub/videos.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts index 0d2e8766d..7e1d57c34 100644 --- a/server/helpers/custom-validators/activitypub/videos.ts +++ b/server/helpers/custom-validators/activitypub/videos.ts | |||
@@ -43,13 +43,14 @@ function isActivityPubVideoDurationValid (value: string) { | |||
43 | } | 43 | } |
44 | 44 | ||
45 | function sanitizeAndCheckVideoTorrentObject (video: any) { | 45 | function sanitizeAndCheckVideoTorrentObject (video: any) { |
46 | if (video.type !== 'Video') return false | ||
47 | |||
46 | if (!setValidRemoteTags(video)) return false | 48 | if (!setValidRemoteTags(video)) return false |
47 | if (!setValidRemoteVideoUrls(video)) return false | 49 | if (!setValidRemoteVideoUrls(video)) return false |
48 | if (!setRemoteVideoTruncatedContent(video)) return false | 50 | if (!setRemoteVideoTruncatedContent(video)) return false |
49 | if (!setValidAttributedTo(video)) return false | 51 | if (!setValidAttributedTo(video)) return false |
50 | 52 | ||
51 | return video.type === 'Video' && | 53 | return isActivityPubUrlValid(video.id) && |
52 | isActivityPubUrlValid(video.id) && | ||
53 | isVideoNameValid(video.name) && | 54 | isVideoNameValid(video.name) && |
54 | isActivityPubVideoDurationValid(video.duration) && | 55 | isActivityPubVideoDurationValid(video.duration) && |
55 | isUUIDValid(video.uuid) && | 56 | isUUIDValid(video.uuid) && |