feat: add verify_app_name calls to all shell subcommands
Without this, folks could potentially run commands against invalid applications.
This commit is contained in:
@@ -10,7 +10,7 @@ cmd-git-initialize() {
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1"
|
||||
|
||||
is_valid_app_name "$APP"
|
||||
verify_app_name "$APP"
|
||||
dokku_log_info1_quiet "Initializing git repository for $APP"
|
||||
fn-git-create-hook "$APP"
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ cmd-git-set() {
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" KEY="$2" VALUE="$3"
|
||||
local VALID_KEYS=("deploy-branch" "keep-git-dir" "rev-env-var")
|
||||
verify_app_name "$APP"
|
||||
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
[[ -z "$KEY" ]] && dokku_log_fail "No key specified"
|
||||
|
||||
if ! fn-in-array "$KEY" "${VALID_KEYS[@]}"; then
|
||||
|
||||
Reference in New Issue
Block a user