Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
normalize email on password change
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Nov 28, 2018
1 parent 0c3fbeb commit 555d404
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jslib
3 changes: 2 additions & 1 deletion src/app/settings/change-password.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 555d404

Please sign in to comment.