[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 <cesar.a.gonzalezcs@gmail.com>

* replace hasMasterPassword with hasMasterPasswordAndMasterKeyHash

---------

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
This commit is contained in:
Jonathan Prusik 2023-09-08 10:25:32 -04:00 committed by GitHub
parent 61e1bc1a1c
commit da06f1e5de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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",