1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

tracked last-launched ciphers for autofill

This commit is contained in:
Addison Beck
2020-10-12 13:33:26 -04:00
parent c86151d74f
commit fdfb6fb152
4 changed files with 13 additions and 2 deletions

View File

@@ -232,6 +232,13 @@ export default class AutofillService implements AutofillServiceInterface {
cipher = await this.cipherService.getNextCipherForUrl(tab.url);
} else {
cipher = await this.cipherService.getLastUsedForUrl(tab.url);
const lastLaunchedCipher = await this.cipherService.getLastLaunchedForUrl(tab.url);
if (lastLaunchedCipher && Date.now().valueOf() - lastLaunchedCipher.localData?.lastLaunched?.valueOf() < 30000) {
cipher = lastLaunchedCipher;
}
else {
cipher = await this.cipherService.getLastUsedForUrl(tab.url);
}
}
const autoFillResponse = await this.doAutoFill({