mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
only copy totp on login types
This commit is contained in:
parent
5b6158c0b7
commit
a0b953208d
@ -47,7 +47,8 @@ var bg_isBackground = true,
|
||||
bg_cryptoService, logout);
|
||||
bg_passwordGenerationService = new PasswordGenerationService(bg_constantsService, bg_utilsService, bg_cryptoService);
|
||||
bg_totpService = new TotpService(bg_constantsService);
|
||||
bg_autofillService = new AutofillService(bg_utilsService, bg_totpService, bg_tokenService, bg_cipherService);
|
||||
bg_autofillService = new AutofillService(bg_utilsService, bg_totpService, bg_tokenService, bg_cipherService,
|
||||
bg_constantsService);
|
||||
|
||||
if (chrome.commands) {
|
||||
chrome.commands.onCommand.addListener(function (command) {
|
||||
|
@ -1,8 +1,9 @@
|
||||
function AutofillService(utilsService, totpService, tokenService, cipherService) {
|
||||
function AutofillService(utilsService, totpService, tokenService, cipherService, constantsService) {
|
||||
this.utilsService = utilsService;
|
||||
this.totpService = totpService;
|
||||
this.tokenService = tokenService;
|
||||
this.cipherService = cipherService;
|
||||
this.cipherService = cipherService;
|
||||
|
||||
initAutofill();
|
||||
}
|
||||
@ -238,8 +239,9 @@ function initAutofill() {
|
||||
fillScript: fillScript
|
||||
}, { frameId: options.pageDetails[i].frameId });
|
||||
|
||||
if (totpPromise || (options.fromBackground && self.utilsService.isFirefox()) ||
|
||||
options.skipTotp || !options.cipher.login || !options.cipher.login.totp || !self.tokenService.getPremium()) {
|
||||
if (options.cipher.type !== self.constantsService.cipherType.login || totpPromise ||
|
||||
(options.fromBackground && self.utilsService.isFirefox()) || options.skipTotp ||
|
||||
!options.cipher.login.totp || !self.tokenService.getPremium()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user