diff --git a/crates/proto-xmpp/src/bind.rs b/crates/proto-xmpp/src/bind.rs index 41c9e45..dc0d1ce 100644 --- a/crates/proto-xmpp/src/bind.rs +++ b/crates/proto-xmpp/src/bind.rs @@ -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}"))?;