forked from lavina/lavina
xmpp: relax the jid regex a bit
This commit is contained in:
parent
fbb3d4f4f9
commit
02a8309d9e
|
@ -48,7 +48,7 @@ impl Jid {
|
|||
use lazy_static::lazy_static;
|
||||
use regex::Regex;
|
||||
lazy_static! {
|
||||
static ref RE: Regex = Regex::new(r"^(([a-zA-Z]+)@)?([a-zA-Z.]+)(/([a-zA-Z\-]+))?$").unwrap();
|
||||
static ref RE: Regex = Regex::new(r"^(([a-zA-Z0-9]+)@)?([^@/]+)(/([a-zA-Z0-9\-]+))?$").unwrap();
|
||||
}
|
||||
let m = RE.captures(i).ok_or(anyhow!("Incorrectly format jid: {i}"))?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue