From 61902a8b5b7da8f8623be28f2a00b6fd20ba0cea Mon Sep 17 00:00:00 2001 From: Pallav Vasa Date: Sat, 17 May 2025 06:33:36 +0000 Subject: [PATCH] feat: remove ability to copy directly using scp/sftp --- gitops_router.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gitops_router.sh b/gitops_router.sh index e5280da..539c336 100644 --- a/gitops_router.sh +++ b/gitops_router.sh @@ -8,8 +8,6 @@ REPO="babbarc/workspaces" BRANCH="master" URL="$PROTOCOL://$HOST/$REPO/raw/branch/$BRANCH" -ALLOWED_PATH="/home/infilytics/home.tar.gz" - LOG_FILE="/tmp/.gitops-router-${PERSON}.log" log() { @@ -20,11 +18,6 @@ log() { log info "Received SSH_ORIGINAL_COMMAND: $SSH_ORIGINAL_COMMAND" -if [[ "${SSH_ORIGINAL_COMMAND:-}" == "scp -t $ALLOWED_PATH" ]]; then - exec scp -t "ALLOWED_PATH" - exit -fi - # Ensure the variable is set if [[ -z "${SSH_ORIGINAL_COMMAND:-}" ]]; then log error "No SSH_ORIGINAL_COMMAND provided." @@ -92,9 +85,6 @@ clean) status) podman images ;; -scp) - log error "Invalid scp upload path: $args" - ;; *) log error "Unknown command: $command" exit 127