fix(ApResolverService): remote user who is followed by local user can bypass recursion limit

This commit is contained in:
オスカー、 2024-12-07 00:39:43 +09:00
parent b4b28bc6c5
commit 65f3f47b9a
No known key found for this signature in database
GPG key ID: 8947F3AF5B0B4BFE

View file

@ -83,7 +83,7 @@ export class Resolver {
throw new Error('cannot resolve already resolved one'); 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)}`); throw new Error(`hit recursion limit: ${this.utilityService.extractDbHost(value)}`);
} }