From da06f1e5def7fe5f58968992ff47e9f9e829a2ac Mon Sep 17 00:00:00 2001 From: Jonathan Prusik Date: Fri, 8 Sep 2023 10:25:32 -0400 Subject: [PATCH] [PM-3612] Bug - Reprompt prevents autofill keyboard shortcut from cycling fill ciphers (#6096) * cycle last used cipher on subsequent keyboard shortcut use on a page * incorporate master password existence check * cycle next cipher before reprompt Co-authored-by: Cesar Gonzalez * replace hasMasterPassword with hasMasterPasswordAndMasterKeyHash --------- Co-authored-by: Cesar Gonzalez --- apps/browser/src/autofill/services/autofill.service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/browser/src/autofill/services/autofill.service.ts b/apps/browser/src/autofill/services/autofill.service.ts index 9d5dfb8a20..dc2a4918c3 100644 --- a/apps/browser/src/autofill/services/autofill.service.ts +++ b/apps/browser/src/autofill/services/autofill.service.ts @@ -265,9 +265,14 @@ export default class AutofillService implements AutofillServiceInterface { } if ( - cipher.reprompt !== CipherRepromptType.None && + cipher.reprompt === CipherRepromptType.Password && + // If the master password has is not available, reprompt will error (await this.userVerificationService.hasMasterPasswordAndMasterKeyHash()) ) { + if (fromCommand) { + this.cipherService.updateLastUsedIndexForUrl(tab.url); + } + await BrowserApi.tabSendMessageData(tab, "passwordReprompt", { cipherId: cipher.id, action: "autofill",