Skip to content

Commit 80154ca

Browse files
committed
limit topic length
1 parent e87e2c2 commit 80154ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ntfy-daemon/src/models.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn emoji_map() -> &'static HashMap<String, String> {
1818
}
1919

2020
pub fn validate_topic(topic: &str) -> Result<&str, Error> {
21-
let re = Regex::new(r"^[\w\-]+$").unwrap();
21+
let re = Regex::new(r"^[\w\-]{1,64}$").unwrap();
2222
if re.is_match(topic) {
2323
Ok(topic)
2424
} else {

0 commit comments

Comments
 (0)