From 555d40408d4d97afcdebc74abf19dcbce4cf0a8c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 28 Nov 2018 08:54:33 -0500 Subject: [PATCH] normalize email on password change --- jslib | 2 +- src/app/settings/change-password.component.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jslib b/jslib index 6920cf77b93..739d308498a 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 6920cf77b9373ed25f882ce68f17dde582e0a5be +Subproject commit 739d308498ab68df3e37772265733c81b27f2cc2 diff --git a/src/app/settings/change-password.component.ts b/src/app/settings/change-password.component.ts index bbe479df156..1c9b4774c87 100644 --- a/src/app/settings/change-password.component.ts +++ b/src/app/settings/change-password.component.ts @@ -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;