diff options
author | Michael Muré <batolettre@gmail.com> | 2021-03-21 22:41:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-21 22:41:50 +0100 |
commit | 01b949091290a3bfd5870c6457c941db1abf3d67 (patch) | |
tree | e4e34fab94fbad2fc54290d1da490b84a4ba9932 /repository/gogit.go | |
parent | 52df5a1f1199d085b2bb10fb7ed5599dcb8307c4 (diff) | |
parent | 9434d2ea5c6da5e856d0bbb02046a5886dfaa600 (diff) | |
download | git-bug-01b949091290a3bfd5870c6457c941db1abf3d67.tar.gz |
Merge pull request #604 from MichaelMure/sec-issue
repo: fix security issue that could lead to arbitrary code execution
Diffstat (limited to 'repository/gogit.go')
-rw-r--r-- | repository/gogit.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/repository/gogit.go b/repository/gogit.go index bdac259d..f2d2b57e 100644 --- a/repository/gogit.go +++ b/repository/gogit.go @@ -5,7 +5,6 @@ import ( "fmt" "io/ioutil" "os" - "os/exec" "path/filepath" "sort" "strings" @@ -20,6 +19,7 @@ import ( "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/filemode" "github.com/go-git/go-git/v5/plumbing/object" + "golang.org/x/sys/execabs" "github.com/MichaelMure/git-bug/util/lamport" ) @@ -261,7 +261,7 @@ func (repo *GoGitRepo) GetCoreEditor() (string, error) { } for _, cmd := range priorities { - if _, err = exec.LookPath(cmd); err == nil { + if _, err = execabs.LookPath(cmd); err == nil { return cmd, nil } |