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
feat(security): add authorization checks for package updates in Livewire components
Andras Bacsai37ee6717e953
diff --git a/app/Livewire/Server/Security/Patches.php b/app/Livewire/Server/Security/Patches.phpindex ae114c2245..b4d151424d 100644--- a/app/Livewire/Server/Security/Patches.php+++ b/app/Livewire/Server/Security/Patches.php@@ -69,8 +69,9 @@ class Patches extends Componentpublic function updateAllPackages(){+ $this->authorize('update', $this->server);if (! $this->packageManager || ! $this->osId) {- $this->dispatch('error', message: 'Run “Check for updates” first.');+ $this->dispatch('error', message: 'Run "Check for updates" first.');return;}@@ -91,6 +92,7 @@ class Patches extends Componentpublic function updatePackage($package){try {+ $this->authorize('update', $this->server);$activity = UpdatePackage::run(server: $this->server, packageManager: $this->packageManager, osId: $this->osId, package: $package);$this->dispatch('activityMonitor', $activity->id, ServerPackageUpdated::class);} catch (\Exception $e) {