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(healthcheck): accept comma and semicolon in health check path validation
ShadowArcanistb18de3af9a51
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.phpindex 785e8c8e34..6fe89786fb 100644--- a/app/Jobs/ApplicationDeploymentJob.php+++ b/app/Jobs/ApplicationDeploymentJob.php@@ -2848,7 +2848,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue$scheme = $this->sanitizeHealthCheckValue($this->application->health_check_scheme, '/^https?$/', 'http');$host = $this->sanitizeHealthCheckValue($this->application->health_check_host, '/^[a-zA-Z0-9.\-_]+$/', 'localhost');$path = $this->application->health_check_path- ? $this->sanitizeHealthCheckValue($this->application->health_check_path, '#^[a-zA-Z0-9/\-_.~%]+$#', '/')+ ? $this->sanitizeHealthCheckValue($this->application->health_check_path, '#^[a-zA-Z0-9/\-_.~%,;]+$#', '/'): null;$url = escapeshellarg("{$scheme}://{$host}:{$health_check_port}".($path ?? '/'));diff --git a/app/Livewire/Project/Shared/HealthChecks.php b/app/Livewire/Project/Shared/HealthChecks.phpindex 0d5d71b457..195e7fd929 100644--- a/app/Livewire/Project/Shared/HealthChecks.php+++ b/app/Livewire/Project/Shared/HealthChecks.php@@ -34,7 +34,7 @@ class HealthChecks extends Component#[Validate(['nullable', 'integer', 'min:1', 'max:65535'])]public ?string $healthCheckPort = null;- #[Validate(['required', 'string', 'regex:#^[a-zA-Z0-9/\-_.~%]+$#'])]+ #[Validate(['required', 'string', 'regex:#^[a-zA-Z0-9/\-_.~%,;]+$#'])]public string $healthCheckPath;#[Validate(['integer'])]@@ -62,7 +62,7 @@ class HealthChecks extends Component'healthCheckEnabled' => 'boolean','healthCheckType' => 'string|in:http,cmd','healthCheckCommand' => ['nullable', 'string', 'max:1000', 'regex:/^[a-zA-Z0-9 \-_.\/:=@,+]+$/'],- 'healthCheckPath' => ['required', 'string', 'regex:#^[a-zA-Z0-9/\-_.~%]+$#'],+ 'healthCheckPath' => ['required', 'string', 'regex:#^[a-zA-Z0-9/\-_.~%,;]+$#'],'healthCheckPort' => 'nullable|integer|min:1|max:65535','healthCheckHost' => ['required', 'string', 'regex:/^[a-zA-Z0-9.\-_]+$/'],'healthCheckMethod' => 'required|string|in:GET,HEAD,POST,OPTIONS',diff --git a/bootstrap/helpers/api.php b/bootstrap/helpers/api.phpindex ec42761f75..fc4c58bb89 100644--- a/bootstrap/helpers/api.php+++ b/bootstrap/helpers/api.php@@ -106,7 +106,7 @@ function sharedDataApplications()'health_check_enabled' => 'boolean','health_check_type' => 'string|in:http,cmd','health_check_command' => ['nullable', 'string', 'max:1000', 'regex:/^[a-zA-Z0-9 \-_.\/:=@,+]+$/'],- 'health_check_path' => ['string', 'regex:#^[a-zA-Z0-9/\-_.~%]+$#'],+ 'health_check_path' => ['string', 'regex:#^[a-zA-Z0-9/\-_.~%,;]+$#'],'health_check_port' => 'integer|nullable|min:1|max:65535','health_check_host' => ['string', 'regex:/^[a-zA-Z0-9.\-_]+$/'],'health_check_method' => 'string|in:GET,HEAD,POST,OPTIONS',