1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

only copy totp on login types

This commit is contained in:
Kyle Spearrin
2017-10-17 21:10:44 -04:00
parent 5b6158c0b7
commit a0b953208d
2 changed files with 7 additions and 4 deletions

View File

@@ -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;
}