diff options
author | Jesse Luehrs <doy@tozt.net> | 2024-04-20 15:54:47 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2024-04-20 15:54:47 -0400 |
commit | fa1b4fe139adfc36733bda6f06c15915312aebf8 (patch) | |
tree | 73a18cc68501a4e4b32075fd6a8c80f32928246b | |
parent | 19e6c3d38177d0556ca347574681fe38aa006c26 (diff) | |
download | rbw-fa1b4fe139adfc36733bda6f06c15915312aebf8.tar.gz rbw-fa1b4fe139adfc36733bda6f06c15915312aebf8.zip |
normalize email address before using it in the password hash
-rw-r--r-- | src/identity.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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<u32>, parallelism: Option<u32>, ) -> Result<Self> { + let email = email.trim().to_lowercase(); + let iterations = std::num::NonZeroU32::new(iterations) .ok_or(Error::Pbkdf2ZeroIterations)?; |