From fa1b4fe139adfc36733bda6f06c15915312aebf8 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 20 Apr 2024 15:54:47 -0400 Subject: normalize email address before using it in the password hash --- src/identity.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/identity.rs b/src/identity.rs index 7836a11..fd46b85 100644 --- a/src/identity.rs +++ b/src/identity.rs @@ -17,6 +17,8 @@ impl Identity { memory: Option, parallelism: Option, ) -> Result { + let email = email.trim().to_lowercase(); + let iterations = std::num::NonZeroU32::new(iterations) .ok_or(Error::Pbkdf2ZeroIterations)?; -- cgit v1.2.3-54-g00ecf