]> git.ipfire.org Git - thirdparty/git.git/commit
git-gui: assure PATH has only absolute elements.
authorMark Levedahl <mlevedahl@gmail.com>
Fri, 11 Apr 2025 14:08:52 +0000 (10:08 -0400)
committerTaylor Blau <me@ttaylorr.com>
Fri, 23 May 2025 21:04:23 +0000 (17:04 -0400)
commit8fe7861c5185248a5786e87af71e29000cd4f214
treee68f25f0a12f8619525959e278aa3b9f6c76733a
parent676c49583f063c6cb92e5b38eb6576929cebf1ff
git-gui: assure PATH has only absolute elements.

Since 8f23432b38d9 (windows: ignore empty `PATH` elements, 2022-11-23),
git-gui excises all empty paths from $PATH, but still allows '.' or
other relative paths, which can also allow executing code from the
repository. Let's remove anything except absolute elements. While here,
let's remove duplicated elements, which are very common on Windows:
only the first such item can do anything except waste time repeating a
search.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
git-gui.sh