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

2
jslib

@ -1 +1 @@
Subproject commit 6920cf77b9373ed25f882ce68f17dde582e0a5be Subproject commit 739d308498ab68df3e37772265733c81b27f2cc2

View File

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