1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

normalize email on password change

This commit is contained in:
Kyle Spearrin
2018-11-28 08:54:33 -05:00
parent 0c3fbeb0b7
commit 555d40408d
2 changed files with 3 additions and 2 deletions

View File

@@ -95,7 +95,8 @@ export class ChangePasswordComponent implements OnInit {
const email = await this.userService.getEmail();
const kdf = await this.userService.getKdf();
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.trim().toLowerCase(),
kdf, kdfIterations);
request.newMasterPasswordHash = await this.cryptoService.hashPassword(this.newMasterPassword, newKey);
const newEncKey = await this.cryptoService.remakeEncKey(newKey);
request.key = newEncKey[1].encryptedString;