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(validation): add input validation for sentinel configuration
ShadowArcanist1ebba7da3acc
diff --git a/app/Livewire/Server/Sentinel.php b/app/Livewire/Server/Sentinel.phpindex dff379ae19..a4b35891b2 100644--- a/app/Livewire/Server/Sentinel.php+++ b/app/Livewire/Server/Sentinel.php@@ -25,13 +25,13 @@ class Sentinel extends Componentpublic ?string $sentinelUpdatedAt = null;#[Validate(['required', 'integer', 'min:1'])]- public int $sentinelMetricsRefreshRateSeconds;+ public int|string $sentinelMetricsRefreshRateSeconds;#[Validate(['required', 'integer', 'min:1'])]- public int $sentinelMetricsHistoryDays;+ public int|string $sentinelMetricsHistoryDays;#[Validate(['required', 'integer', 'min:10'])]- public int $sentinelPushIntervalSeconds;+ public int|string $sentinelPushIntervalSeconds;#[Validate(['nullable', 'url'])]public ?string $sentinelCustomUrl = null;diff --git a/resources/views/livewire/server/sentinel.blade.php b/resources/views/livewire/server/sentinel.blade.phpindex 4016a30e47..5ca535cbc1 100644--- a/resources/views/livewire/server/sentinel.blade.php+++ b/resources/views/livewire/server/sentinel.blade.php@@ -91,13 +91,14 @@<div class="flex flex-col gap-2"><div class="flex flex-wrap gap-2 sm:flex-nowrap">- <x-forms.input canGate="update" :canResource="$server"+ <x-forms.input canGate="update" :canResource="$server" type="number" min="1"id="sentinelMetricsRefreshRateSeconds" label="Metrics rate (seconds)" requiredhelper="Interval used for gathering metrics. Lower values result in more disk space usage." />- <x-forms.input canGate="update" :canResource="$server" id="sentinelMetricsHistoryDays"+ <x-forms.input canGate="update" :canResource="$server" type="number" min="1"+ id="sentinelMetricsHistoryDays"label="Metrics history (days)" requiredhelper="Number of days to retain metrics data for." />- <x-forms.input canGate="update" :canResource="$server"+ <x-forms.input canGate="update" :canResource="$server" type="number" min="10"id="sentinelPushIntervalSeconds" label="Push interval (seconds)" requiredhelper="Interval at which metrics data is sent to the collector." /></div>