From 65f3f47b9a33accc6795e755cc17646b3e76acee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AA=E3=82=B9=E3=82=AB=E3=83=BC=E3=80=81?= Date: Sat, 7 Dec 2024 00:39:43 +0900 Subject: [PATCH] fix(ApResolverService): remote user who is followed by local user can bypass recursion limit --- packages/backend/src/core/activitypub/ApResolverService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/activitypub/ApResolverService.ts b/packages/backend/src/core/activitypub/ApResolverService.ts index fbe32ba18..a4060a3d1 100644 --- a/packages/backend/src/core/activitypub/ApResolverService.ts +++ b/packages/backend/src/core/activitypub/ApResolverService.ts @@ -83,7 +83,7 @@ export class Resolver { throw new Error('cannot resolve already resolved one'); } - if (this.history.size > this.recursionLimit) { + if (this.history.size > this.recursionLimit && (this.user?.followersCount ?? 0) > 0) { throw new Error(`hit recursion limit: ${this.utilityService.extractDbHost(value)}`); }