From b811e67f864f7553f4262f2451be571579688691 Mon Sep 17 00:00:00 2001 From: Jeffrey Holland Date: Tue, 22 Apr 2025 13:20:22 +0200 Subject: [PATCH] Filter available cipher results --- .../passkeys/create/fido2-create.component.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/modal/passkeys/create/fido2-create.component.ts b/apps/desktop/src/modal/passkeys/create/fido2-create.component.ts index 7aeae6dce68..7dfe3516633 100644 --- a/apps/desktop/src/modal/passkeys/create/fido2-create.component.ts +++ b/apps/desktop/src/modal/passkeys/create/fido2-create.component.ts @@ -93,7 +93,12 @@ export class Fido2CreateComponent implements OnInit, OnDestroy { const credentialId = cipher.login.hasFido2Credentials ? parseCredentialId(cipher.login.fido2Credentials[0]?.credentialId) : new Uint8Array(); - if (!cipher.login || !cipher.login.hasUris) { + if ( + !cipher.login || + !cipher.login.hasUris || + cipher.deletedDate || + cipher.login.username != lastRegistrationRequest.userName + ) { return false; } @@ -113,7 +118,12 @@ export class Fido2CreateComponent implements OnInit, OnDestroy { const credentialId = cipher.login.hasFido2Credentials ? Array.from(parseCredentialId(cipher.login.fido2Credentials[0]?.credentialId)) : []; - if (!cipher.login || !cipher.login.hasUris) { + if ( + !cipher.login || + !cipher.login.hasUris || + cipher.deletedDate || + cipher.login.username != lastRegistrationRequest.userName + ) { return false; }