mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-22611] Require userid for masterKey methods on the key service (#15663)
* Require userId on targeted methods. * update method consumers * unit tests
This commit is contained in:
@@ -428,7 +428,8 @@ export class LoginCommand {
|
||||
);
|
||||
|
||||
const request = new PasswordRequest();
|
||||
request.masterPasswordHash = await this.keyService.hashMasterKey(currentPassword, null);
|
||||
const masterKey = await this.keyService.getOrDeriveMasterKey(currentPassword, userId);
|
||||
request.masterPasswordHash = await this.keyService.hashMasterKey(currentPassword, masterKey);
|
||||
request.masterPasswordHint = hint;
|
||||
request.newMasterPasswordHash = newPasswordHash;
|
||||
request.key = newUserKey[1].encryptedString;
|
||||
|
||||
Reference in New Issue
Block a user