diff options
author | Johannes Sixt <j6t@kdbg.org> | 2025-04-21 18:14:54 +0200 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2025-05-23 17:04:23 -0400 |
commit | 4f3e0a4bcef2c6caff68f96137d9914c5f2f98c2 (patch) | |
tree | a2cd158ea1695e0af46853333677bf070ae3ed3c /merge-blobs.c | |
parent | c2e8904258544f3d79dc4e96d1269c0ad8124db3 (diff) |
git-gui: sanitize 'exec' arguments: simple cases
Tcl 'exec' assigns special meaning to its argument when they begin with
redirection, pipe or background operator. There are a number of
invocations of 'exec' which construct arguments that are taken from the
Git repository or a user input. However, when file names or ref names
are taken from the repository, it is possible to find names that have
these special forms. They must not be interpreted by 'exec' lest it
redirects input or output, or attempts to build a pipeline using a
command name controlled by the repository.
Introduce a helper function that identifies such arguments and prepends
"./" to force such a name to be regarded as a relative file name.
Convert those 'exec' calls where the arguments can simply be packed
into a list.
Note that most commands containing the word 'exec' route through
console::exec or console::chain, which we will treat in another commit.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'merge-blobs.c')
0 files changed, 0 insertions, 0 deletions