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)