mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[PM-26096] Bugfix: Decryption errors for folders prevent vault access (#16796)
* Handle scenario where folders fail to decrypt * Add comment explaining the folderViews$ filter check
This commit is contained in:
@@ -59,9 +59,12 @@ export class DefaultCipherFormConfigService implements CipherFormConfigService {
|
||||
this.organizationDataOwnershipDisabled$,
|
||||
this.folderService.folders$(activeUserId).pipe(
|
||||
switchMap((f) =>
|
||||
this.folderService.folderViews$(activeUserId).pipe(
|
||||
filter((d) => d.length - 1 === f.length), // -1 for "No Folder" in folderViews$
|
||||
),
|
||||
this.folderService
|
||||
.folderViews$(activeUserId)
|
||||
// Ensure the folders have decrypted. f.length === 0 indicates we don't have any
|
||||
// folders to wait for, and d.length > 0 indicates that `folderViews` has emitted the
|
||||
// array, which includes the "No Folder" default folder.
|
||||
.pipe(filter((d) => d.length > 0 || f.length === 0)),
|
||||
),
|
||||
),
|
||||
this.getCipher(activeUserId, cipherId),
|
||||
|
||||
Reference in New Issue
Block a user