diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/custom-validators/activitypub/activity.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/activitypub/activity.ts b/server/helpers/custom-validators/activitypub/activity.ts index 1d2ef2ac6..381a29e66 100644 --- a/server/helpers/custom-validators/activitypub/activity.ts +++ b/server/helpers/custom-validators/activitypub/activity.ts | |||
@@ -16,6 +16,7 @@ import { | |||
16 | sanitizeAndCheckVideoTorrentUpdateActivity | 16 | sanitizeAndCheckVideoTorrentUpdateActivity |
17 | } from './videos' | 17 | } from './videos' |
18 | import { isViewActivityValid } from './view' | 18 | import { isViewActivityValid } from './view' |
19 | import { exists } from '../misc' | ||
19 | 20 | ||
20 | function isRootActivityValid (activity: any) { | 21 | function isRootActivityValid (activity: any) { |
21 | return Array.isArray(activity['@context']) && ( | 22 | return Array.isArray(activity['@context']) && ( |
@@ -26,6 +27,7 @@ function isRootActivityValid (activity: any) { | |||
26 | ) || | 27 | ) || |
27 | ( | 28 | ( |
28 | isActivityPubUrlValid(activity.id) && | 29 | isActivityPubUrlValid(activity.id) && |
30 | exists(activity.actor) && | ||
29 | (isActivityPubUrlValid(activity.actor) || isActivityPubUrlValid(activity.actor.id)) | 31 | (isActivityPubUrlValid(activity.actor) || isActivityPubUrlValid(activity.actor.id)) |
30 | ) | 32 | ) |
31 | ) | 33 | ) |