From: Chocobozzz Date: Mon, 13 May 2019 12:51:43 +0000 (+0200) Subject: Relax activity validation X-Git-Tag: v1.3.0-rc.1~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3db9fadca78ad1a59f92cb4abc37d63f517a073b;p=oweals%2Fpeertube.git Relax activity validation --- 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) &&