From 20a6fcda72e65f42f9d46846535351134e54b466 Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Thu, 2 Mar 2023 17:14:05 +0100 Subject: [PATCH] don't allow signing own user --- src/matrix/verification/CrossSigning.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/matrix/verification/CrossSigning.ts b/src/matrix/verification/CrossSigning.ts index e58c89e8..a3bd5f47 100644 --- a/src/matrix/verification/CrossSigning.ts +++ b/src/matrix/verification/CrossSigning.ts @@ -135,6 +135,10 @@ export class CrossSigning { return; } // need to be able to get the msk for the user + // can't sign own user + if (userId === this.ownUserId) { + return; + } const keyToSign = await this.deviceTracker.getCrossSigningKeyForUser(userId, KeyUsage.Master, this.hsApi, log); if (!keyToSign) { return undefined;