mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-19 20:14:59 +00:00
fix(security): sanitize newlines in health check commands to prevent RCE (#8898)
This commit is contained in:
1 file changed
+3
-2
@@ -2777,9 +2777,10 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
{
|
{
|
||||||
// Handle CMD type healthcheck
|
// Handle CMD type healthcheck
|
||||||
if ($this->application->health_check_type === 'cmd' && ! empty($this->application->health_check_command)) {
|
if ($this->application->health_check_type === 'cmd' && ! empty($this->application->health_check_command)) {
|
||||||
$this->full_healthcheck_url = $this->application->health_check_command;
|
$command = str_replace(["\r\n", "\r", "\n"], ' ', $this->application->health_check_command);
|
||||||
|
$this->full_healthcheck_url = $command;
|
||||||
|
|
||||||
return $this->application->health_check_command;
|
return $command;
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTP type healthcheck (default)
|
// HTTP type healthcheck (default)
|
||||||
|
|||||||
Reference in new issue
Block a user