1
0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2024-11-11 05:22:40 +01:00

Ensure email domain comparison is case-insensitive

This commit is contained in:
Jeremy Lin 2020-04-11 14:51:36 -07:00
parent e4d08836e2
commit 86685c1cd2

View File

@ -566,7 +566,7 @@ impl Config {
warn!("Failed to parse email address '{}'", email);
return false;
}
let email_domain = e[0];
let email_domain = e[0].to_lowercase();
let whitelist = self.signups_domains_whitelist();
!whitelist.is_empty() && whitelist.split(',').any(|d| d.trim() == email_domain)