diff --git a/common/src/comp/player.rs b/common/src/comp/player.rs index 3c4bbe2002..d0376c2e5a 100644 --- a/common/src/comp/player.rs +++ b/common/src/comp/player.rs @@ -32,7 +32,12 @@ impl Player { pub fn is_valid(&self) -> bool { Self::alias_is_valid(&self.alias) } pub fn alias_is_valid(alias: &str) -> bool { - alias.chars().all(|c| c.is_alphanumeric() || c == '_') && alias.len() <= MAX_ALIAS_LEN + // TODO: Expose auth name validation and use it here. + // See https://gitlab.com/veloren/auth/-/blob/master/server/src/web.rs#L20 + alias + .chars() + .all(|c| c.is_alphanumeric() || c == '_' || c == '-') + && alias.len() <= MAX_ALIAS_LEN } /// Not to be confused with uid