Skip to content

[PM-21896] - prevent double reprompt for copy password in desktop cipher form #14883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/desktop/src/vault/app/vault/vault.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*ngIf="cipherId && action === 'view'"
[cipherId]="cipherId"
[collectionId]="activeFilter?.selectedCollectionId"
[passwordPrompted]="cipherRepromptId === cipherId"
(onCloneCipher)="cloneCipherWithoutPasswordPrompt($event)"
(onEditCipher)="editCipher($event)"
(onViewCipherPasswordHistory)="viewCipherPasswordHistory($event)"
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/src/vault/app/vault/view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
ChangeDetectorRef,
Component,
EventEmitter,
Input,
NgZone,
OnChanges,
OnDestroy,
Expand Down Expand Up @@ -46,6 +47,7 @@
})
export class ViewComponent extends BaseViewComponent implements OnInit, OnDestroy, OnChanges {
@Output() onViewCipherPasswordHistory = new EventEmitter<CipherView>();
@Input() passwordPrompted: boolean = false;

Check warning on line 50 in apps/desktop/src/vault/app/vault/view.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/desktop/src/vault/app/vault/view.component.ts#L50

Added line #L50 was not covered by tests

constructor(
cipherService: CipherService,
Expand Down Expand Up @@ -120,6 +122,7 @@
}
});
});
this.passwordReprompted = this.passwordPrompted;

Check warning on line 125 in apps/desktop/src/vault/app/vault/view.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/desktop/src/vault/app/vault/view.component.ts#L125

Added line #L125 was not covered by tests
}

ngOnDestroy() {
Expand All @@ -134,6 +137,7 @@
});
return;
}
this.passwordReprompted = this.passwordPrompted;

Check warning on line 140 in apps/desktop/src/vault/app/vault/view.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/desktop/src/vault/app/vault/view.component.ts#L140

Added line #L140 was not covered by tests
}

viewHistory() {
Expand Down
2 changes: 1 addition & 1 deletion libs/angular/src/vault/components/view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
cipherType = CipherType;

private previousCipherId: string;
private passwordReprompted = false;
protected passwordReprompted = false;

Check warning on line 98 in libs/angular/src/vault/components/view.component.ts

View check run for this annotation

Codecov / codecov/patch

libs/angular/src/vault/components/view.component.ts#L98

Added line #L98 was not covered by tests

/**
* Represents TOTP information including display formatting and timing
Expand Down
Loading