mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
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:
parent
dddcc2bc93
commit
25a91313ad
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user