From 9a27cdc27c900feaae5f6db4315c4ccdfc0c4493 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Nov 2017 15:20:42 +0100 Subject: Optimize signature verification --- server/helpers/custom-validators/activitypub/misc.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server/helpers/custom-validators') diff --git a/server/helpers/custom-validators/activitypub/misc.ts b/server/helpers/custom-validators/activitypub/misc.ts index f09a764b6..1bbfd0fc4 100644 --- a/server/helpers/custom-validators/activitypub/misc.ts +++ b/server/helpers/custom-validators/activitypub/misc.ts @@ -28,6 +28,10 @@ function isBaseActivityValid (activity: any, type: string) { ( activity.to === undefined || (Array.isArray(activity.to) && activity.to.every(t => isActivityPubUrlValid(t))) + ) && + ( + activity.cc === undefined || + (Array.isArray(activity.cc) && activity.cc.every(t => isActivityPubUrlValid(t))) ) } -- cgit v1.2.3