diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-17 15:20:42 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 9a27cdc27c900feaae5f6db4315c4ccdfc0c4493 (patch) | |
tree | f91fcfa0fa1a2e45aae1c5333ef2f7ec60e56ef0 /server/helpers/custom-validators | |
parent | 975e6e0e44e2f2b25f804cd48a62e2a8d9e8117a (diff) | |
download | PeerTube-9a27cdc27c900feaae5f6db4315c4ccdfc0c4493.tar.gz PeerTube-9a27cdc27c900feaae5f6db4315c4ccdfc0c4493.tar.zst PeerTube-9a27cdc27c900feaae5f6db4315c4ccdfc0c4493.zip |
Optimize signature verification
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r-- | server/helpers/custom-validators/activitypub/misc.ts | 4 |
1 files changed, 4 insertions, 0 deletions
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) { | |||
28 | ( | 28 | ( |
29 | activity.to === undefined || | 29 | activity.to === undefined || |
30 | (Array.isArray(activity.to) && activity.to.every(t => isActivityPubUrlValid(t))) | 30 | (Array.isArray(activity.to) && activity.to.every(t => isActivityPubUrlValid(t))) |
31 | ) && | ||
32 | ( | ||
33 | activity.cc === undefined || | ||
34 | (Array.isArray(activity.cc) && activity.cc.every(t => isActivityPubUrlValid(t))) | ||
31 | ) | 35 | ) |
32 | } | 36 | } |
33 | 37 | ||