diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index 6704f8214..803fd03c9 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -90,10 +90,9 @@ function validateActor(x: IObject): IActor { throw new Error('invalid Actor: publicKey.id is not a string'); } - const publicKeyIdHost = extractDbHost(x.publicKey.id); // This is a security critical check to not insert or change an entry of // UserPublickey to point to a local key id. - if (extractDbHost(uri) !== extractDbHost(x.publicKey.id) { + if (extractDbHost(uri) !== extractDbHost(x.publicKey.id)) { throw new Error('invalid Actor: publicKey.id has different host'); } }