diff --git a/set_version.sh b/set_version.sh index b8b95de4..8b3f716b 100755 --- a/set_version.sh +++ b/set_version.sh @@ -1,3 +1,3 @@ #!/bin/bash -export version=0.5.3-1 +export version=0.5.3-2 echo "pub const VERSION: &str = \"${version}\";" > src/version.rs diff --git a/src/util/regex.rs b/src/util/regex.rs index 051d518f..abe11520 100644 --- a/src/util/regex.rs +++ b/src/util/regex.rs @@ -1,4 +1,9 @@ use once_cell::sync::Lazy; use regex::Regex; -pub static RE_USERNAME: Lazy = Lazy::new(|| Regex::new(r"^[^\u200B]+$").unwrap()); +/// Regex for valid usernames +/// +/// Block zero width space +/// Block lookalike characters +pub static RE_USERNAME: Lazy = + Lazy::new(|| Regex::new(r"^[^\u200BА-Яа-яΑ-Ωα-ω]+$").unwrap()); diff --git a/src/version.rs b/src/version.rs index 68ec5e8d..ca12c069 100644 --- a/src/version.rs +++ b/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "0.5.3-1"; +pub const VERSION: &str = "0.5.3-2";