1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-07 09:31:31 +01:00

dont continue when failed

This commit is contained in:
Kyle Spearrin 2019-03-05 16:22:00 -05:00
parent 9cc84f76d7
commit 39f3a0788d

View File

@ -62,7 +62,9 @@ export class LockComponent implements OnInit {
const decPin = await this.cryptoService.decryptToUtf8(new CipherString(protectedPin)); const decPin = await this.cryptoService.decryptToUtf8(new CipherString(protectedPin));
this.lockService.pinLocked = false; this.lockService.pinLocked = false;
failed = decPin !== this.pin; failed = decPin !== this.pin;
if (!failed) {
this.doContinue(); this.doContinue();
}
} else { } else {
const pinProtectedKey = await this.storageService.get<string>(ConstantsService.pinProtectedKey); const pinProtectedKey = await this.storageService.get<string>(ConstantsService.pinProtectedKey);
const protectedKeyCs = new CipherString(pinProtectedKey); const protectedKeyCs = new CipherString(pinProtectedKey);
@ -71,7 +73,9 @@ export class LockComponent implements OnInit {
failed = false; failed = false;
await this.setKeyAndContinue(new SymmetricCryptoKey(decKey)); await this.setKeyAndContinue(new SymmetricCryptoKey(decKey));
} }
} catch { } } catch {
failed = true;
}
if (failed) { if (failed) {
this.invalidPinAttempts++; this.invalidPinAttempts++;