From d9d6dc1b602ce3ac96ff00c6925a09e6e757765d Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sun, 28 Jul 2024 16:17:13 +0200 Subject: [PATCH] [backend] Limit fetched JSON-LD context size to 1MB --- packages/backend/src/remote/activitypub/misc/ld-signature.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/remote/activitypub/misc/ld-signature.ts b/packages/backend/src/remote/activitypub/misc/ld-signature.ts index 2d1e7ef6b..b654e8976 100644 --- a/packages/backend/src/remote/activitypub/misc/ld-signature.ts +++ b/packages/backend/src/remote/activitypub/misc/ld-signature.ts @@ -126,6 +126,7 @@ export class LdSignature { headers: { Accept: "application/ld+json, application/json", }, + size: 1024 * 1024, // 1MiB // TODO //timeout: this.loderTimeout, agent: (u) => (u.protocol === "http:" ? httpAgent : httpsAgent),