From 3db9fadca78ad1a59f92cb4abc37d63f517a073b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 13 May 2019 14:51:43 +0200 Subject: [PATCH] Relax activity validation --- server/helpers/custom-validators/activitypub/misc.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/helpers/custom-validators/activitypub/misc.ts b/server/helpers/custom-validators/activitypub/misc.ts index f9445929b..5afcfbedc 100644 --- a/server/helpers/custom-validators/activitypub/misc.ts +++ b/server/helpers/custom-validators/activitypub/misc.ts @@ -25,8 +25,7 @@ function isActivityPubUrlValid (url: string) { } function isBaseActivityValid (activity: any, type: string) { - return (activity['@context'] === undefined || Array.isArray(activity['@context'])) && - activity.type === type && + return activity.type === type && isActivityPubUrlValid(activity.id) && isObjectValid(activity.actor) && isUrlCollectionValid(activity.to) &&