1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-09-02 10:04:55 +02:00

Fix segault in ntfy pub

This commit is contained in:
binwiederhier 2023-06-01 14:08:51 -04:00
parent 04cc71af90
commit dc8932cd95
5 changed files with 13 additions and 2 deletions

View file

@ -249,6 +249,10 @@ func parseTopicMessageCommand(c *cli.Context) (topic string, message string, com
if c.String("message") != "" {
message = c.String("message")
}
if !topicRegex.MatchString(topic) {
err = fmt.Errorf("topic %s contains invalid characters", topic)
return
}
return
}