aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index fb1d2d094..5d2a1f171 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -115,18 +115,18 @@ function isRemoteVideoUrlValid (url: any) {
115 return url.type === 'Link' && 115 return url.type === 'Link' &&
116 ( 116 (
117 ACTIVITY_PUB.URL_MIME_TYPES.VIDEO.indexOf(url.mimeType) !== -1 && 117 ACTIVITY_PUB.URL_MIME_TYPES.VIDEO.indexOf(url.mimeType) !== -1 &&
118 isActivityPubUrlValid(url.url) && 118 isActivityPubUrlValid(url.href) &&
119 validator.isInt(url.width + '', { min: 0 }) && 119 validator.isInt(url.width + '', { min: 0 }) &&
120 validator.isInt(url.size + '', { min: 0 }) 120 validator.isInt(url.size + '', { min: 0 })
121 ) || 121 ) ||
122 ( 122 (
123 ACTIVITY_PUB.URL_MIME_TYPES.TORRENT.indexOf(url.mimeType) !== -1 && 123 ACTIVITY_PUB.URL_MIME_TYPES.TORRENT.indexOf(url.mimeType) !== -1 &&
124 isActivityPubUrlValid(url.url) && 124 isActivityPubUrlValid(url.href) &&
125 validator.isInt(url.width + '', { min: 0 }) 125 validator.isInt(url.width + '', { min: 0 })
126 ) || 126 ) ||
127 ( 127 (
128 ACTIVITY_PUB.URL_MIME_TYPES.MAGNET.indexOf(url.mimeType) !== -1 && 128 ACTIVITY_PUB.URL_MIME_TYPES.MAGNET.indexOf(url.mimeType) !== -1 &&
129 validator.isLength(url.url, { min: 5 }) && 129 validator.isLength(url.href, { min: 5 }) &&
130 validator.isInt(url.width + '', { min: 0 }) 130 validator.isInt(url.width + '', { min: 0 })
131 ) 131 )
132} 132}