diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-09 16:16:22 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-11 08:48:20 +0200 |
commit | 1d6e5dfc376f3c0c2120055cc093161e76419f98 (patch) | |
tree | b5333449166fdd0892704f8b9c1e976614857543 /server/helpers/custom-validators/activitypub/activity.ts | |
parent | a077482fb7eece925c44cb31796b40e8e7b1f249 (diff) | |
download | PeerTube-1d6e5dfc376f3c0c2120055cc093161e76419f98.tar.gz PeerTube-1d6e5dfc376f3c0c2120055cc093161e76419f98.tar.zst PeerTube-1d6e5dfc376f3c0c2120055cc093161e76419f98.zip |
Improve video torrent AP object validator
Diffstat (limited to 'server/helpers/custom-validators/activitypub/activity.ts')
-rw-r--r-- | server/helpers/custom-validators/activitypub/activity.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/custom-validators/activitypub/activity.ts b/server/helpers/custom-validators/activitypub/activity.ts index 7e4dccefb..cabedaf20 100644 --- a/server/helpers/custom-validators/activitypub/activity.ts +++ b/server/helpers/custom-validators/activitypub/activity.ts | |||
@@ -11,9 +11,9 @@ import { isUndoActivityValid } from './undo' | |||
11 | import { isVideoCommentCreateActivityValid, isVideoCommentDeleteActivityValid } from './video-comments' | 11 | import { isVideoCommentCreateActivityValid, isVideoCommentDeleteActivityValid } from './video-comments' |
12 | import { | 12 | import { |
13 | isVideoFlagValid, | 13 | isVideoFlagValid, |
14 | isVideoTorrentCreateActivityValid, | 14 | sanitizeAndCheckVideoTorrentCreateActivity, |
15 | isVideoTorrentDeleteActivityValid, | 15 | isVideoTorrentDeleteActivityValid, |
16 | isVideoTorrentUpdateActivityValid | 16 | sanitizeAndCheckVideoTorrentUpdateActivity |
17 | } from './videos' | 17 | } from './videos' |
18 | import { isViewActivityValid } from './view' | 18 | import { isViewActivityValid } from './view' |
19 | 19 | ||
@@ -62,13 +62,13 @@ export { | |||
62 | function checkCreateActivity (activity: any) { | 62 | function checkCreateActivity (activity: any) { |
63 | return isViewActivityValid(activity) || | 63 | return isViewActivityValid(activity) || |
64 | isDislikeActivityValid(activity) || | 64 | isDislikeActivityValid(activity) || |
65 | isVideoTorrentCreateActivityValid(activity) || | 65 | sanitizeAndCheckVideoTorrentCreateActivity(activity) || |
66 | isVideoFlagValid(activity) || | 66 | isVideoFlagValid(activity) || |
67 | isVideoCommentCreateActivityValid(activity) | 67 | isVideoCommentCreateActivityValid(activity) |
68 | } | 68 | } |
69 | 69 | ||
70 | function checkUpdateActivity (activity: any) { | 70 | function checkUpdateActivity (activity: any) { |
71 | return isVideoTorrentUpdateActivityValid(activity) || | 71 | return sanitizeAndCheckVideoTorrentUpdateActivity(activity) || |
72 | isActorUpdateActivityValid(activity) | 72 | isActorUpdateActivityValid(activity) |
73 | } | 73 | } |
74 | 74 | ||