Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
[bug] Ensure neverLock vaults can be manually locked (#607)
Browse files Browse the repository at this point in the history
The client side storage restructuring work incorrectly checks if a vault has ever been unlocked to determine neverLock scenerios, but production does the opposite.
This creates an inability to never manually lock neverLock vaults.
This commit sets that condition back to the way it was.
  • Loading branch information
Addison Beck committed Jan 12, 2022
1 parent c7ccb99 commit 957e010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/src/services/vaultTimeout.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class VaultTimeoutService implements VaultTimeoutServiceAbstraction {
async isLocked(userId?: string): Promise<boolean> {
const neverLock =
(await this.cryptoService.hasKeyStored(KeySuffixOptions.Auto, userId)) &&
(await this.stateService.getEverBeenUnlocked({ userId: userId }));
!(await this.stateService.getEverBeenUnlocked({ userId: userId }));
if (neverLock) {
// TODO: This also _sets_ the key so when we check memory in the next line it finds a key.
// We should refactor here.
Expand Down

0 comments on commit 957e010

Please sign in to comment.