mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-01 00:10:39 +02: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_cryptoService, logout);
|
||||||
bg_passwordGenerationService = new PasswordGenerationService(bg_constantsService, bg_utilsService, bg_cryptoService);
|
bg_passwordGenerationService = new PasswordGenerationService(bg_constantsService, bg_utilsService, bg_cryptoService);
|
||||||
bg_totpService = new TotpService(bg_constantsService);
|
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) {
|
if (chrome.commands) {
|
||||||
chrome.commands.onCommand.addListener(function (command) {
|
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.utilsService = utilsService;
|
||||||
this.totpService = totpService;
|
this.totpService = totpService;
|
||||||
this.tokenService = tokenService;
|
this.tokenService = tokenService;
|
||||||
this.cipherService = cipherService;
|
this.cipherService = cipherService;
|
||||||
|
this.cipherService = cipherService;
|
||||||
|
|
||||||
initAutofill();
|
initAutofill();
|
||||||
}
|
}
|
||||||
|
@ -238,8 +239,9 @@ function initAutofill() {
|
||||||
fillScript: fillScript
|
fillScript: fillScript
|
||||||
}, { frameId: options.pageDetails[i].frameId });
|
}, { frameId: options.pageDetails[i].frameId });
|
||||||
|
|
||||||
if (totpPromise || (options.fromBackground && self.utilsService.isFirefox()) ||
|
if (options.cipher.type !== self.constantsService.cipherType.login || totpPromise ||
|
||||||
options.skipTotp || !options.cipher.login || !options.cipher.login.totp || !self.tokenService.getPremium()) {
|
(options.fromBackground && self.utilsService.isFirefox()) || options.skipTotp ||
|
||||||
|
!options.cipher.login.totp || !self.tokenService.getPremium()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user