Update set of allowed characters in UserId localpart
This commit is contained in:
parent
f84b7f2b7f
commit
7fa1407d76
@ -17,8 +17,10 @@ use url::Host;
|
||||
|
||||
use crate::{display, error::Error, generate_localpart, parse_id};
|
||||
|
||||
static USER_LOCALPART_PATTERN: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new(r"\A[a-z0-9._=-]+\z").expect("Failed to create user localpart regex."));
|
||||
// See https://matrix.org/docs/spec/appendices#user-identifiers
|
||||
static USER_LOCALPART_PATTERN: Lazy<Regex> = Lazy::new(|| {
|
||||
Regex::new(r"\A[a-z0-9\-.=_/]+\z").expect("Failed to create user localpart regex.")
|
||||
});
|
||||
|
||||
/// A Matrix user ID.
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user