mirror of
https://github.com/tiennm99/coolify.git
synced 2026-07-09 23:07:10 +00:00
fix(security): sanitize newlines in health check commands to prevent RCE (#8898)
This commit is contained in:
@@ -2777,9 +2777,10 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
{
|
||||
// Handle CMD type healthcheck
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user