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};
|
use crate::{display, error::Error, generate_localpart, parse_id};
|
||||||
|
|
||||||
static USER_LOCALPART_PATTERN: Lazy<Regex> =
|
// See https://matrix.org/docs/spec/appendices#user-identifiers
|
||||||
Lazy::new(|| Regex::new(r"\A[a-z0-9._=-]+\z").expect("Failed to create user localpart regex."));
|
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.
|
/// A Matrix user ID.
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user