diff --git a/ntfy-daemon/src/models.rs b/ntfy-daemon/src/models.rs index 0748a31..46de3e1 100644 --- a/ntfy-daemon/src/models.rs +++ b/ntfy-daemon/src/models.rs @@ -18,7 +18,7 @@ fn emoji_map() -> &'static HashMap { } pub fn validate_topic(topic: &str) -> Result<&str, Error> { - let re = Regex::new(r"^[\w\-]+$").unwrap(); + let re = Regex::new(r"^[\w\-]{1,64}$").unwrap(); if re.is_match(topic) { Ok(topic) } else {