Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

core: add comment about why we aren't lowercasing email for old password generation

Abdullah Atta4c3e06592884
diff --git a/packages/core/src/api/user-manager.ts b/packages/core/src/api/user-manager.ts
index c6ac5b3c6..c1150a102 100644
--- a/packages/core/src/api/user-manager.ts
+++ b/packages/core/src/api/user-manager.ts
@@ -632,7 +632,10 @@ class UserManager {
throw new Error("Incorrect old password.");
const oldPassword = old_password
- ? await this.db.storage().hash(old_password, email, {
+ ? // we don't lowercase email here to allow user accounts with
+ // mixed cased emails to change their passwords. Once that is done,
+ // we will lowercase the email in the backend.
+ await this.db.storage().hash(old_password, email, {
usesFallback: await this.usesFallbackPWHash(old_password)
})
: null;