Password reprompt fixes (#393)

* Hide card secrets, and ensure password is reprompted when navigating away

* Check password reprompt before downloading attachments
This commit is contained in:
Oscar Hinton 2021-05-28 19:38:04 +02:00 committed by GitHub
parent dddcc2bc93
commit 25a91313ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -436,7 +436,7 @@ export class AddEditComponent implements OnInit {
async toggleCardNumber() {
this.showCardNumber = !this.showCardNumber;
if (this.showCardNumber) {
this.eventService.collect(EventType.Cipher_ClientToggledCardCodeVisible, this.cipherId);
this.eventService.collect(EventType.Cipher_ClientToggledCardNumberVisible, this.cipherId);
}
}

View File

@ -286,6 +286,9 @@ export class ViewComponent implements OnDestroy, OnInit {
}
async downloadAttachment(attachment: AttachmentView) {
if (!await this.promptPassword()) {
return;
}
const a = (attachment as any);
if (a.downloading) {
return;
@ -353,6 +356,9 @@ export class ViewComponent implements OnDestroy, OnInit {
this.totpCode = null;
this.cipher = null;
this.showPassword = false;
this.showCardNumber = false;
this.showCardCode = false;
this.passwordReprompted = false;
if (this.totpInterval) {
clearInterval(this.totpInterval);
}