aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-05-13 14:51:43 +0200
committerChocobozzz <me@florianbigard.com>2019-05-13 14:51:43 +0200
commit3db9fadca78ad1a59f92cb4abc37d63f517a073b (patch)
tree2b32c8d389561c972bed9d30e0b587d2a15b8c58
parent241c3357d13ac2fb4c8ffca6469e575388c1fac5 (diff)
downloadPeerTube-3db9fadca78ad1a59f92cb4abc37d63f517a073b.tar.gz
PeerTube-3db9fadca78ad1a59f92cb4abc37d63f517a073b.tar.zst
PeerTube-3db9fadca78ad1a59f92cb4abc37d63f517a073b.zip
Relax activity validation
-rw-r--r--server/helpers/custom-validators/activitypub/misc.ts3
1 files changed, 1 insertions, 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) {
25} 25}
26 26
27function isBaseActivityValid (activity: any, type: string) { 27function isBaseActivityValid (activity: any, type: string) {
28 return (activity['@context'] === undefined || Array.isArray(activity['@context'])) && 28 return activity.type === type &&
29 activity.type === type &&
30 isActivityPubUrlValid(activity.id) && 29 isActivityPubUrlValid(activity.id) &&
31 isObjectValid(activity.actor) && 30 isObjectValid(activity.actor) &&
32 isUrlCollectionValid(activity.to) && 31 isUrlCollectionValid(activity.to) &&