Fix #2915
Add forward slash cleanup of the app name for the git-upload-pack command. Prevents is_valid_app_name from removing the application folder on `git fetch`.
This commit is contained in:
@@ -153,7 +153,7 @@ git_build() {
|
||||
git_upload_pack_cmd() {
|
||||
declare desc="executes git-upload-pack"
|
||||
local cmd="git-upload-pack"
|
||||
local APP="$(echo "$2" | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g')"
|
||||
local APP="$(echo "$2" | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g' | sed 's/^\///g')"
|
||||
is_valid_app_name "$APP"
|
||||
plugn trigger git-pre-pull "$APP"
|
||||
cat | git-upload-pack "$DOKKU_ROOT/$APP"
|
||||
|
||||
Reference in New Issue
Block a user