From 7c5e24c07c094813edd0b603d38c72c814761f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=82=8F=E3=82=8F=E3=82=8F=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Sat, 28 Dec 2024 18:50:41 +0900 Subject: [PATCH] =?UTF-8?q?fix(ActivityPub):=20=E3=83=AA=E3=83=A2=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=83=80=E3=82=A4=E3=83=AC=E3=82=AF=E3=83=88=E3=82=92=E4=BF=A1?= =?UTF-8?q?=E9=A0=BC=E3=81=99=E3=82=8B=20(MisskeyIO#860)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/core/activitypub/ApResolverService.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApResolverService.ts b/packages/backend/src/core/activitypub/ApResolverService.ts index e61cc90b4..ddb56fa39 100644 --- a/packages/backend/src/core/activitypub/ApResolverService.ts +++ b/packages/backend/src/core/activitypub/ApResolverService.ts @@ -120,18 +120,6 @@ export class Resolver { throw new Error('invalid response'); } - // HttpRequestService / ApRequestService have already checked that - // `object.id` or `object.url` matches the URL used to fetch the - // object after redirects; here we double-check that no redirects - // bounced between hosts - if (object.id == null) { - throw new Error('invalid AP object: missing id'); - } - - if (!this.utilityService.isRelatedUris(object.id, value)) { - throw new Error(`invalid AP object ${value}: id ${object.id} has unrelated host`); - } - return object; }