1
0
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:
Bernd Schoolmann
2025-01-29 19:54:17 +01:00
parent d4caf6f8f5
commit 4e3a44e248
3 changed files with 7 additions and 0 deletions

View File

@@ -176,6 +176,7 @@ export class ChangePasswordComponent
this.currentMasterPassword,
this.masterPassword,
user,
this.masterPasswordHint,
);
} else {
await this.keyRotationService.rotateUserKeyAndEncryptedDataLegacy(

View File

@@ -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;
}
}

View File

@@ -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),