gitreef

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 089aa369e967ed7108372cf1ac3550d0d6cb909b
parent e2e77d94a3e875fffe369a13312427369ecb7374
Author: Matthias Jaros <jaros@mailbox.org>
Date:   Mon, 27 Oct 2025 14:00:37 +0100

Adjusted some comments and found a bug with realpath that is not defined at the moment of usage

Diffstat:
MREADME | 7+++----
Msrc/git-run | 5+++--
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/README b/README @@ -1,8 +1,8 @@ # README -Welcome to git-server, a simple and super duper fast server for your git repos. +Welcome to git-server, a simple, fast, memory friendly and secure server for your git repos. -The scope of this server is to have a simple, minimal and secure git-server with no unnecessary features and management overhead. +The scope of this server is to have a minimal git-server with no unnecessary features and management overhead. It is for everyone who does not need or want a fancy GUI and more features besides of basic ones. Thus it is small, secure, fast and uses barely memory (under 10MB). ## Features @@ -10,8 +10,7 @@ It is for everyone who does not need or want a fancy GUI and more features besid * Dockerized * Easy config over command line or docker compose * Fast & Secure with minimal dependencies: Git, SSH, Fish, Sudo -* Build in user management. -* Build in repo management. +* Build in user and repo handling. * Basic ACL with read/write permissions * Logfile of all git operations diff --git 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