Fix segault in ntfy pub
This commit is contained in:
parent
04cc71af90
commit
dc8932cd95
5 changed files with 13 additions and 2 deletions
|
@ -72,7 +72,7 @@ ntfy subscribe TOPIC COMMAND
|
|||
$NTFY_TITLE $title, $t Message title
|
||||
$NTFY_PRIORITY $priority, $prio, $p Message priority (1=min, 5=max)
|
||||
$NTFY_TAGS $tags, $tag, $ta Message tags (comma separated list)
|
||||
$NTFY_RAW $raw Raw JSON message
|
||||
$NTFY_RAW $raw Raw JSON message
|
||||
|
||||
Examples:
|
||||
ntfy sub mytopic 'notify-send "$m"' # Execute command for incoming messages
|
||||
|
@ -108,6 +108,8 @@ func execSubscribe(c *cli.Context) error {
|
|||
// Checks
|
||||
if user != "" && token != "" {
|
||||
return errors.New("cannot set both --user and --token")
|
||||
} else if !topicRegex.MatchString(topic) {
|
||||
return fmt.Errorf("topic %s contains invalid characters", topic)
|
||||
}
|
||||
|
||||
if !fromConfig {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue