mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +01:00
remakeEncKey when changing password/email
This commit is contained in:
parent
4a815b0bdf
commit
85c3056223
2
jslib
2
jslib
@ -1 +1 @@
|
|||||||
Subproject commit 6f43b73237fc64394441d5821bd88090b26cbe5b
|
Subproject commit 00562d083b687fb566b09c0df8a05e90b86f9e5a
|
@ -57,9 +57,8 @@ export class ChangeEmailComponent {
|
|||||||
const kdfIterations = await this.userService.getKdfIterations();
|
const kdfIterations = await this.userService.getKdfIterations();
|
||||||
const newKey = await this.cryptoService.makeKey(this.masterPassword, this.newEmail, kdf, kdfIterations);
|
const newKey = await this.cryptoService.makeKey(this.masterPassword, this.newEmail, kdf, kdfIterations);
|
||||||
request.newMasterPasswordHash = await this.cryptoService.hashPassword(this.masterPassword, newKey);
|
request.newMasterPasswordHash = await this.cryptoService.hashPassword(this.masterPassword, newKey);
|
||||||
const encKey = await this.cryptoService.getEncKey();
|
const newEncKey = await this.cryptoService.remakeEncKey(newKey);
|
||||||
const newEncKey = await this.cryptoService.encrypt(encKey.key, newKey);
|
request.key = newEncKey[1].encryptedString;
|
||||||
request.key = newEncKey.encryptedString;
|
|
||||||
try {
|
try {
|
||||||
this.formPromise = this.apiService.postEmail(request);
|
this.formPromise = this.apiService.postEmail(request);
|
||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
|
@ -58,9 +58,8 @@ export class ChangePasswordComponent {
|
|||||||
const kdfIterations = await this.userService.getKdfIterations();
|
const kdfIterations = await this.userService.getKdfIterations();
|
||||||
const newKey = await this.cryptoService.makeKey(this.newMasterPassword, email, kdf, kdfIterations);
|
const newKey = await this.cryptoService.makeKey(this.newMasterPassword, email, kdf, kdfIterations);
|
||||||
request.newMasterPasswordHash = await this.cryptoService.hashPassword(this.newMasterPassword, newKey);
|
request.newMasterPasswordHash = await this.cryptoService.hashPassword(this.newMasterPassword, newKey);
|
||||||
const encKey = await this.cryptoService.getEncKey();
|
const newEncKey = await this.cryptoService.remakeEncKey(newKey);
|
||||||
const newEncKey = await this.cryptoService.encrypt(encKey.key, newKey);
|
request.key = newEncKey[1].encryptedString;
|
||||||
request.key = newEncKey.encryptedString;
|
|
||||||
try {
|
try {
|
||||||
this.formPromise = this.apiService.postPassword(request);
|
this.formPromise = this.apiService.postPassword(request);
|
||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
|
Loading…
Reference in New Issue
Block a user