diff options
Diffstat (limited to 'server/helpers/custom-validators/activitypub')
-rw-r--r-- | server/helpers/custom-validators/activitypub/activity.ts | 2 | ||||
-rw-r--r-- | server/helpers/custom-validators/activitypub/misc.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/activitypub/activity.ts b/server/helpers/custom-validators/activitypub/activity.ts index 632f14223..7e4dccefb 100644 --- a/server/helpers/custom-validators/activitypub/activity.ts +++ b/server/helpers/custom-validators/activitypub/activity.ts | |||
@@ -26,7 +26,7 @@ function isRootActivityValid (activity: any) { | |||
26 | ) || | 26 | ) || |
27 | ( | 27 | ( |
28 | isActivityPubUrlValid(activity.id) && | 28 | isActivityPubUrlValid(activity.id) && |
29 | isActivityPubUrlValid(activity.actor) | 29 | (isActivityPubUrlValid(activity.actor) || isActivityPubUrlValid(activity.actor.id)) |
30 | ) | 30 | ) |
31 | } | 31 | } |
32 | 32 | ||
diff --git a/server/helpers/custom-validators/activitypub/misc.ts b/server/helpers/custom-validators/activitypub/misc.ts index 75d308e9d..2dac8e1ad 100644 --- a/server/helpers/custom-validators/activitypub/misc.ts +++ b/server/helpers/custom-validators/activitypub/misc.ts | |||
@@ -24,7 +24,7 @@ function isBaseActivityValid (activity: any, type: string) { | |||
24 | return (activity['@context'] === undefined || Array.isArray(activity['@context'])) && | 24 | return (activity['@context'] === undefined || Array.isArray(activity['@context'])) && |
25 | activity.type === type && | 25 | activity.type === type && |
26 | isActivityPubUrlValid(activity.id) && | 26 | isActivityPubUrlValid(activity.id) && |
27 | isActivityPubUrlValid(activity.actor) && | 27 | (isActivityPubUrlValid(activity.actor) || isActivityPubUrlValid(activity.actor.id)) && |
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))) |