summaryrefslogtreecommitdiff
path: root/src/git-run
diff options
context:
space:
mode:
authorGravatar Matthias Jaros <jarlucmat@mailbox.org>2025-10-27 14:00:37 +0100
committerGravatar Matthias Jaros <jarlucmat@mailbox.org>2025-10-27 14:00:37 +0100
commit350ddcef6df7cf34b49010d37cd4803878b786ed (patch)
tree8665047f34df796a0323e93c9b48b62f826152b0 /src/git-run
parenta30c798bc0bb6959bfbc0900137099104c3e3ba5 (diff)
Adjusted some comments and found a bug with realpath that is not defined at the moment of usage
Diffstat (limited to 'src/git-run')
-rwxr-xr-xsrc/git-run5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/git-run b/src/git-run
index bdee05c..0390e58 100755
--- a/src/git-run
+++ b/src/git-run
@@ -8,9 +8,10 @@ set -l repoDir
# redirect stdout/stderr to file, no information to potential attacker
begin
+ set -l currentUser (whoami)
+
# check given git command
# basic form is <git-command> '<path-to-repo>'
- set -l currentUser (whoami)
set -l matcher (string match -r -g $_GIT_VALIDATION_REGEX -- "$argv")
if test (count $matcher) -ne 2
echo "$(date -Is): DENY bad_format user=$currentUser ip=$SSH_CONNECTION argv=$argv"
@@ -35,7 +36,7 @@ begin
set permission [w]
case '*'
# this should not happend because we sanitize above the git command
- echo "$(date -Is): DENY unkown_git_command user=$currentUser ip=$SSH_CONNECTION realPath=$realPath argv=$argv"
+ echo "$(date -Is): DENY unkown_git_command user=$currentUser ip=$SSH_CONNECTION gitCommand=$gitCommand argv=$argv"
exit 2
end