1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-31 23:14:48 +00:00

Convert email domains to punycode

This commit is contained in:
Daniel García 2020-01-30 22:11:53 +01:00
commit def174a517
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
4 changed files with 1150 additions and 1146 deletions

View file

@ -271,7 +271,7 @@ impl EmailTokenData {
/// Takes an email address and obscures it by replacing it with asterisks except two characters.
pub fn obscure_email(email: &str) -> String {
let split: Vec<&str> = email.split('@').collect();
let split: Vec<&str> = email.rsplitn(2, '@').collect();
let mut name = split[0].to_string();
let domain = &split[1];