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:
1 parent
5b3506584a
commit
c9af7e4cfa
1 file changed
+1
-1
@@ -153,7 +153,7 @@ git_build() {
|
|||||||
git_upload_pack_cmd() {
|
git_upload_pack_cmd() {
|
||||||
declare desc="executes git-upload-pack"
|
declare desc="executes git-upload-pack"
|
||||||
local cmd="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"
|
is_valid_app_name "$APP"
|
||||||
plugn trigger git-pre-pull "$APP"
|
plugn trigger git-pre-pull "$APP"
|
||||||
cat | git-upload-pack "$DOKKU_ROOT/$APP"
|
cat | git-upload-pack "$DOKKU_ROOT/$APP"
|
||||||
|
|||||||
Reference in new issue
Block a user