mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-21 21:11:35 +01:00
fix cli
This commit is contained in:
parent
160ca2cd3b
commit
7a25c376ce
@ -45,12 +45,12 @@ export class UnlockCommand {
|
||||
const kdf = await this.stateService.getKdfType();
|
||||
const kdfConfig = await this.stateService.getKdfConfig();
|
||||
const masterKey = await this.cryptoService.makeMasterKey(password, email, kdf, kdfConfig);
|
||||
const storedKeyHash = await this.cryptoService.getKeyHash();
|
||||
const storedKeyHash = await this.cryptoService.getPasswordHash();
|
||||
|
||||
let passwordValid = false;
|
||||
if (masterKey != null) {
|
||||
if (storedKeyHash != null) {
|
||||
passwordValid = await this.cryptoService.compareAndUpdateKeyHash(password, masterKey);
|
||||
passwordValid = await this.cryptoService.compareAndUpdatePasswordHash(password, masterKey);
|
||||
} else {
|
||||
const serverKeyHash = await this.cryptoService.hashPassword(
|
||||
password,
|
||||
@ -67,7 +67,7 @@ export class UnlockCommand {
|
||||
masterKey,
|
||||
HashPurpose.LocalAuthorization
|
||||
);
|
||||
await this.cryptoService.setKeyHash(localKeyHash);
|
||||
await this.cryptoService.setPasswordHash(localKeyHash);
|
||||
} catch {
|
||||
// Ignore
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user