From 39f3a0788dd393d7769bfbba629b6dec31b98399 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 5 Mar 2019 16:22:00 -0500 Subject: [PATCH] dont continue when failed --- src/angular/components/lock.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/angular/components/lock.component.ts b/src/angular/components/lock.component.ts index 715c43f5b0..419124f038 100644 --- a/src/angular/components/lock.component.ts +++ b/src/angular/components/lock.component.ts @@ -62,7 +62,9 @@ export class LockComponent implements OnInit { const decPin = await this.cryptoService.decryptToUtf8(new CipherString(protectedPin)); this.lockService.pinLocked = false; failed = decPin !== this.pin; - this.doContinue(); + if (!failed) { + this.doContinue(); + } } else { const pinProtectedKey = await this.storageService.get(ConstantsService.pinProtectedKey); const protectedKeyCs = new CipherString(pinProtectedKey); @@ -71,7 +73,9 @@ export class LockComponent implements OnInit { failed = false; await this.setKeyAndContinue(new SymmetricCryptoKey(decKey)); } - } catch { } + } catch { + failed = true; + } if (failed) { this.invalidPinAttempts++;