refactor: reparse the original ssh command in the hopes of keeping array arguments in place
This commit is contained in:
1 parent
dc20a38756
commit
91c8e62da5
1 file changed
+2
-9
@@ -107,20 +107,13 @@ fi
|
||||
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
|
||||
export -n SSH_ORIGINAL_COMMAND
|
||||
exit_code=0
|
||||
if [[ $1 =~ git-* ]] || [[ $1 =~ git:* ]]; then
|
||||
readarray -t -O "${#ssh_arg_array[@]}" ssh_arg_array < <( printf '%s' "$SSH_ORIGINAL_COMMAND" | xargs -n 1 )
|
||||
set -f
|
||||
$0 $SSH_ORIGINAL_COMMAND
|
||||
exit_code=$?
|
||||
set +f
|
||||
exit $?
|
||||
else
|
||||
set -f
|
||||
xargs $0 <<<$SSH_ORIGINAL_COMMAND
|
||||
$O "${ssh_arg_array[@]}"
|
||||
exit_code=$?
|
||||
set +f
|
||||
exit $exit_code
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! dokku_auth "$@"; then
|
||||
dokku_log_fail "Access denied"
|
||||
|
||||
Reference in new issue
Block a user