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(git-import): explicitly specify ssh key and remove duplicate validation rules
Andras Bacsaiaac34f1d149b
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.phpindex b51d04fca5..fcd619fd4e 100644--- a/app/Jobs/ApplicationDeploymentJob.php+++ b/app/Jobs/ApplicationDeploymentJob.php@@ -2133,7 +2133,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueueexecuteInDocker($this->deployment_uuid, 'chmod 600 /root/.ssh/id_rsa'),],[- executeInDocker($this->deployment_uuid, "GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$this->customPort} -o Port={$this->customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null\" git ls-remote {$this->fullRepoUrl} {$lsRemoteRef}"),+ executeInDocker($this->deployment_uuid, "GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$this->customPort} -o Port={$this->customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git ls-remote {$this->fullRepoUrl} {$lsRemoteRef}"),'hidden' => true,'save' => 'git_commit_sha',]diff --git a/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php b/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.phpindex b9af20c760..e46ad7d788 100644--- a/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php+++ b/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php@@ -57,16 +57,6 @@ class GithubPrivateRepositoryDeployKey extends Componentprivate ?string $git_repository = null;- protected $rules = [- 'repository_url' => ['required', 'string'],- 'branch' => ['required', 'string'],- 'port' => 'required|numeric',- 'is_static' => 'required|boolean',- 'publish_directory' => 'nullable|string',- 'build_pack' => 'required|string',- 'docker_compose_location' => \App\Support\ValidationPatterns::filePathRules(),- ];-protected function rules(){return [diff --git a/app/Livewire/Project/New/PublicGitRepository.php b/app/Livewire/Project/New/PublicGitRepository.phpindex cc2510a666..3df31a6a3d 100644--- a/app/Livewire/Project/New/PublicGitRepository.php+++ b/app/Livewire/Project/New/PublicGitRepository.php@@ -63,16 +63,6 @@ class PublicGitRepository extends Componentpublic bool $new_compose_services = false;- protected $rules = [- 'repository_url' => ['required', 'string'],- 'port' => 'required|numeric',- 'isStatic' => 'required|boolean',- 'publish_directory' => 'nullable|string',- 'build_pack' => 'required|string',- 'base_directory' => 'nullable|string',- 'docker_compose_location' => \App\Support\ValidationPatterns::filePathRules(),- ];-protected function rules(){return [diff --git a/tests/Feature/CommandInjectionSecurityTest.php b/tests/Feature/CommandInjectionSecurityTest.phpindex 7047e4bc6d..b2df8d1f13 100644--- a/tests/Feature/CommandInjectionSecurityTest.php+++ b/tests/Feature/CommandInjectionSecurityTest.php@@ -169,7 +169,6 @@ describe('API validation rules for path fields', function () {expect($validator->fails())->toBeFalse();});-});test('dockerfile_location validation allows paths with @ for scoped packages', function () {$rules = sharedDataApplications();