mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 21:50:15 +00:00
Pass through masterpassword hint
This commit is contained in:
@@ -176,6 +176,7 @@ export class ChangePasswordComponent
|
||||
this.currentMasterPassword,
|
||||
this.masterPassword,
|
||||
user,
|
||||
this.masterPasswordHint,
|
||||
);
|
||||
} else {
|
||||
await this.keyRotationService.rotateUserKeyAndEncryptedDataLegacy(
|
||||
|
||||
@@ -11,11 +11,14 @@ export class MasterPasswordUnlockDataRequest {
|
||||
|
||||
masterKeyEncryptedUserKey: string;
|
||||
|
||||
masterPasswordHint?: string;
|
||||
|
||||
constructor(
|
||||
kdfConfig: KdfConfig,
|
||||
email: string,
|
||||
masterKeyAuthenticationHash: string,
|
||||
masterKeyEncryptedUserKey: string,
|
||||
masterPasswordHash?: string,
|
||||
) {
|
||||
this.kdfType = kdfConfig.kdfType;
|
||||
this.kdfIterations = kdfConfig.iterations;
|
||||
@@ -27,5 +30,6 @@ export class MasterPasswordUnlockDataRequest {
|
||||
this.email = email;
|
||||
this.masterKeyAuthenticationHash = masterKeyAuthenticationHash;
|
||||
this.masterKeyEncryptedUserKey = masterKeyEncryptedUserKey;
|
||||
this.masterPasswordHint = masterPasswordHash;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ export class UserKeyRotationService {
|
||||
oldMasterPassword: string,
|
||||
newMasterPassword: string,
|
||||
user: Account,
|
||||
newMasterPasswordHint?: string,
|
||||
): Promise<void> {
|
||||
this.logService.info("[Userkey rotation] Starting user key rotation...");
|
||||
if (!newMasterPassword) {
|
||||
@@ -119,6 +120,7 @@ export class UserKeyRotationService {
|
||||
email,
|
||||
newMasterKeyAuthenticationHash,
|
||||
newMasterKeyEncryptedUserKey.encryptedString,
|
||||
newMasterPasswordHint,
|
||||
);
|
||||
const { privateKey, publicKey } = await firstValueFrom(
|
||||
this.keyService.userEncryptionKeyPair$(user.id),
|
||||
|
||||
Reference in New Issue
Block a user