From 4bd8d30aa6a9f7d67ff8cb9a109c93a3df7b84e3 Mon Sep 17 00:00:00 2001 From: TimedIn Date: Mon, 27 Nov 2023 09:14:14 +0100 Subject: [PATCH] Added dashes (-) to allowed topics --- ntfy-daemon/src/models.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntfy-daemon/src/models.rs b/ntfy-daemon/src/models.rs index 4e824ba..0748a31 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\-]+$").unwrap(); if re.is_match(topic) { Ok(topic) } else {