From 373eca7a1970af778c306d9e26032dcc4209abb2 Mon Sep 17 00:00:00 2001 From: eternal-flame-AD Date: Mon, 25 Nov 2024 19:43:40 -0600 Subject: [PATCH] revert redundant host checks in ApResolver Signed-off-by: eternal-flame-AD --- .../backend/src/core/activitypub/ApResolverService.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApResolverService.ts b/packages/backend/src/core/activitypub/ApResolverService.ts index 0ef7f5ad56..b3abcd0fb6 100644 --- a/packages/backend/src/core/activitypub/ApResolverService.ts +++ b/packages/backend/src/core/activitypub/ApResolverService.ts @@ -129,12 +129,8 @@ export class Resolver { throw new Error('invalid AP object: missing id'); } - const idURL = yumeAssertAcceptableURL(object.id); - const valueURL = yumeAssertAcceptableURL(value); - - if (toASCII(idURL.host) !== toASCII(valueURL.host)) { - throw new Bull.UnrecoverableError(`invalid AP object ${value}: id ${object.id} has different host`); - } + yumeAssertAcceptableURL(object.id); + yumeAssertAcceptableURL(value); return object; }