summaryrefslogtreecommitdiff
path: root/src/git-run
diff options
context:
space:
mode:
authorGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-27 14:00:37 +0100
committerGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-27 14:00:37 +0100
commitec0776c0a17ed4cc779fabd8273aee33f252d62f (patch)
tree8665047f34df796a0323e93c9b48b62f826152b0 /src/git-run
parent66529be32099eb1ddf67eb79d1fb736c16db5aed (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