diff options
author | Michael Muré <batolettre@gmail.com> | 2021-04-17 17:40:11 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-04-17 17:40:11 +0200 |
commit | 51a2c85954e77068c6afbb4ca54159086220aefd (patch) | |
tree | 9b424181369a67f69502a27186bd266a19a28506 /commands/label_add.go | |
parent | 62fb09a53cc626ac581f33b466a1cdf14eb6ed89 (diff) | |
download | git-bug-51a2c85954e77068c6afbb4ca54159086220aefd.tar.gz |
make sure every text input is safe and validated
fix #630
Diffstat (limited to 'commands/label_add.go')
-rw-r--r-- | commands/label_add.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/label_add.go b/commands/label_add.go index ce971f04..30c0d77f 100644 --- a/commands/label_add.go +++ b/commands/label_add.go @@ -4,6 +4,7 @@ import ( "github.com/spf13/cobra" _select "github.com/MichaelMure/git-bug/commands/select" + "github.com/MichaelMure/git-bug/util/text" ) func newLabelAddCommand() *cobra.Command { @@ -30,7 +31,7 @@ func runLabelAdd(env *Env, args []string) error { added := args - changes, _, err := b.ChangeLabels(added, nil) + changes, _, err := b.ChangeLabels(text.CleanupOneLineArray(added), nil) for _, change := range changes { env.out.Println(change) |