fix: consistent username validation across routes

fixes #187
This commit is contained in:
Paul Makles
2022-06-20 10:27:22 +01:00
parent f96541efab
commit 0585dd0c20
3 changed files with 12 additions and 10 deletions

View File

@@ -6,4 +6,4 @@ use regex::Regex;
/// Block zero width space
/// Block lookalike characters
pub static RE_USERNAME: Lazy<Regex> =
Lazy::new(|| Regex::new(r"^[^\u200BА-Яа-яΑ-Ωα-ω]+$").unwrap());
Lazy::new(|| Regex::new(r"^[^\u200BА-Яа-яΑ-Ωα-ω@#:\n]+$").unwrap());