From cf506d3bd9b990310157e7abe3076f551c20c260 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 27 Mar 2024 13:02:04 +0100 Subject: [PATCH] [backend] Reject anonymous objects in the AP resolver --- packages/backend/src/remote/activitypub/resolver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/remote/activitypub/resolver.ts b/packages/backend/src/remote/activitypub/resolver.ts index 4c9cce9d5..53185cd42 100644 --- a/packages/backend/src/remote/activitypub/resolver.ts +++ b/packages/backend/src/remote/activitypub/resolver.ts @@ -124,7 +124,7 @@ export default class Resolver { const {res, object} = await this.doFetch(value); - if (object.id == null) return object; + if (object.id == null) throw new Error("Object has no ID"); if (res.finalUrl === object.id) return object; if (new URL(res.finalUrl).host !== new URL(object.id).host)