An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: hashed random delimeter in ssh commands + make sure to remove the delimeter from the command
Andras Bacsai353245bb7de9
diff --git a/bootstrap/helpers/remoteProcess.php b/bootstrap/helpers/remoteProcess.phpindex 0a51b3ffcb..bfb86406ca 100644--- a/bootstrap/helpers/remoteProcess.php+++ b/bootstrap/helpers/remoteProcess.php@@ -7,11 +7,10 @@ use App\Models\Application;use App\Models\ApplicationDeploymentQueue;use App\Models\PrivateKey;use App\Models\Server;-use App\Notifications\Server\Revived;-use App\Notifications\Server\Unreachable;use Carbon\Carbon;use Illuminate\Database\Eloquent\Model;use Illuminate\Support\Collection;+use Illuminate\Support\Facades\Hash;use Illuminate\Support\Facades\Process;use Illuminate\Support\Facades\Storage;use Illuminate\Support\Str;@@ -135,7 +134,6 @@ function generateSshCommand(Server $server, string $command)$connectionTimeout = config('constants.ssh.connection_timeout');$serverInterval = config('constants.ssh.server_interval');- $delimiter = 'EOF-COOLIFY-SSH';$ssh_command = "timeout $timeout ssh ";if (config('coolify.mux_enabled') && config('coolify.is_windows_docker_desktop') == false) {@@ -145,6 +143,9 @@ function generateSshCommand(Server $server, string $command)$ssh_command .= '-o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" ';}$command = "PATH=\$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/local/sbin:/host/usr/local/bin:/host/usr/sbin:/host/usr/bin:/host/sbin:/host/bin && $command";++ $delimiter = Hash::make($command);+ $command = str_replace($delimiter, '', $command);$ssh_command .= "-i {$privateKeyLocation} ". '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '. '-o PasswordAuthentication=no '@@ -158,6 +159,7 @@ function generateSshCommand(Server $server, string $command). $command . PHP_EOL. $delimiter;// ray($ssh_command);+ ray($delimiter);return $ssh_command;}function instant_remote_process(Collection|array $command, Server $server, $throwError = true)