diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-19 15:47:55 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-19 15:47:55 +0200 |
commit | 12ba460e9ebf4951f9c1caee8822a8ca1523563f (patch) | |
tree | 5dd2815c92ef54ed315dbd30c027ce7e92dad008 /server/lib/activitypub/process/process.ts | |
parent | e587e0ecee5bec43a225995948faaa4bc97f080a (diff) | |
download | PeerTube-12ba460e9ebf4951f9c1caee8822a8ca1523563f.tar.gz PeerTube-12ba460e9ebf4951f9c1caee8822a8ca1523563f.tar.zst PeerTube-12ba460e9ebf4951f9c1caee8822a8ca1523563f.zip |
Improve AP actor checks
Diffstat (limited to 'server/lib/activitypub/process/process.ts')
-rw-r--r-- | server/lib/activitypub/process/process.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/lib/activitypub/process/process.ts b/server/lib/activitypub/process/process.ts index 35ad1696a..b263f1ea2 100644 --- a/server/lib/activitypub/process/process.ts +++ b/server/lib/activitypub/process/process.ts | |||
@@ -29,6 +29,11 @@ async function processActivities (activities: Activity[], signatureActor?: Actor | |||
29 | const actorsCache: { [ url: string ]: ActorModel } = {} | 29 | const actorsCache: { [ url: string ]: ActorModel } = {} |
30 | 30 | ||
31 | for (const activity of activities) { | 31 | for (const activity of activities) { |
32 | if (!signatureActor && [ 'Create', 'Announce', 'Like' ].indexOf(activity.type) === -1) { | ||
33 | logger.error('Cannot process activity %s (type: %s) without the actor signature.', activity.id, activity.type) | ||
34 | continue | ||
35 | } | ||
36 | |||
32 | const actorUrl = getActorUrl(activity.actor) | 37 | const actorUrl = getActorUrl(activity.actor) |
33 | 38 | ||
34 | // When we fetch remote data, we don't have signature | 39 | // When we fetch remote data, we don't have signature |