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:
parent
2798f623d4
commit
def174a517
4 changed files with 1150 additions and 1146 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue