]> git.ipfire.org Git - thirdparty/git.git/commit
git-gui: treat file names beginning with "|" as relative paths
authorJohannes Sixt <j6t@kdbg.org>
Mon, 21 Apr 2025 15:07:10 +0000 (17:07 +0200)
committerTaylor Blau <me@ttaylorr.com>
Fri, 23 May 2025 21:04:23 +0000 (17:04 -0400)
commitc2e8904258544f3d79dc4e96d1269c0ad8124db3
tree765508ff33690a5d1b7e3c7c7c3fb1070c74215a
parent8255167b26003767b0ab50f498ffec33f80c2ef2
git-gui: treat file names beginning with "|" as relative paths

The Tcl 'open' function has a very wide interface. It can open files as
well as pipes to external processes. The difference is made only by the
first character of the file name: if it is "|", a process is spawned.

We have a number of calls of Tcl 'open' that take a file name from the
environment in which Git GUI is running. Be prepared that insane values
are injected. In particular, when we intend to open a file, do not take
a file name that happens to begin with "|" as a request to run a process.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
git-gui.sh
lib/blame.tcl
lib/choose_repository.tcl
lib/choose_rev.tcl
lib/commit.tcl
lib/diff.tcl
lib/merge.tcl
lib/mergetool.tcl
lib/remote.tcl
lib/shortcut.tcl
lib/sshkey.tcl