From e9324fd410604408e2f0f9242b9059ca0c17af36 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:27:42 +0200 Subject: [PATCH] fix(deployment-job): escape single quotes in build arguments for Docker Compose command - Added logic to escape single quotes in build arguments to ensure proper execution in bash -c context used by executeInDocker, preventing potential command errors. --- app/Jobs/ApplicationDeploymentJob.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index bd45c09c6..c5ab62136 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -642,6 +642,8 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue if (! $this->application->settings->use_build_secrets && $this->build_args instanceof \Illuminate\Support\Collection && $this->build_args->isNotEmpty()) { $build_args_string = $this->build_args->implode(' '); + // Escape single quotes for bash -c context used by executeInDocker + $build_args_string = str_replace("'", "'\\''", $build_args_string); $command .= " {$build_args_string}"; $this->application_deployment_queue->addLogEntry('Adding build arguments to Docker Compose build command.'); }