mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 10:23:30 +00:00
fix(security): enforce team access on mutable actions
Authorize cloud provider token access, audit sensitive operations, and standardize public IDs across deployment and resource flows.
This commit is contained in:
@@ -30,7 +30,6 @@ use Illuminate\Validation\Rule;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Spatie\Url\Url;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
use Visus\Cuid2\Cuid2;
|
||||
|
||||
class ApplicationsController extends Controller
|
||||
{
|
||||
@@ -1197,7 +1196,7 @@ class ApplicationsController extends Controller
|
||||
$application->isConfigurationChanged(true);
|
||||
|
||||
if ($instantDeploy) {
|
||||
$deployment_uuid = new Cuid2;
|
||||
$deployment_uuid = new_public_id();
|
||||
|
||||
$result = queue_application_deployment(
|
||||
application: $application,
|
||||
@@ -1436,7 +1435,7 @@ class ApplicationsController extends Controller
|
||||
$application->isConfigurationChanged(true);
|
||||
|
||||
if ($instantDeploy) {
|
||||
$deployment_uuid = new Cuid2;
|
||||
$deployment_uuid = new_public_id();
|
||||
|
||||
$result = queue_application_deployment(
|
||||
application: $application,
|
||||
@@ -1645,7 +1644,7 @@ class ApplicationsController extends Controller
|
||||
$application->isConfigurationChanged(true);
|
||||
|
||||
if ($instantDeploy) {
|
||||
$deployment_uuid = new Cuid2;
|
||||
$deployment_uuid = new_public_id();
|
||||
|
||||
$result = queue_application_deployment(
|
||||
application: $application,
|
||||
@@ -1691,7 +1690,7 @@ class ApplicationsController extends Controller
|
||||
], 422);
|
||||
}
|
||||
if (! $request->has('name')) {
|
||||
$request->offsetSet('name', 'dockerfile-'.new Cuid2);
|
||||
$request->offsetSet('name', 'dockerfile-'.new_public_id());
|
||||
}
|
||||
|
||||
$return = $this->validateDataApplications($request, $server);
|
||||
@@ -1765,7 +1764,7 @@ class ApplicationsController extends Controller
|
||||
$application->isConfigurationChanged(true);
|
||||
|
||||
if ($instantDeploy) {
|
||||
$deployment_uuid = new Cuid2;
|
||||
$deployment_uuid = new_public_id();
|
||||
|
||||
$result = queue_application_deployment(
|
||||
application: $application,
|
||||
@@ -1809,7 +1808,7 @@ class ApplicationsController extends Controller
|
||||
], 422);
|
||||
}
|
||||
if (! $request->has('name')) {
|
||||
$request->offsetSet('name', 'docker-image-'.new Cuid2);
|
||||
$request->offsetSet('name', 'docker-image-'.new_public_id());
|
||||
}
|
||||
$return = $this->validateDataApplications($request, $server);
|
||||
if ($return instanceof JsonResponse) {
|
||||
@@ -1884,7 +1883,7 @@ class ApplicationsController extends Controller
|
||||
$application->isConfigurationChanged(true);
|
||||
|
||||
if ($instantDeploy) {
|
||||
$deployment_uuid = new Cuid2;
|
||||
$deployment_uuid = new_public_id();
|
||||
|
||||
$result = queue_application_deployment(
|
||||
application: $application,
|
||||
@@ -2682,7 +2681,7 @@ class ApplicationsController extends Controller
|
||||
]);
|
||||
|
||||
if ($instantDeploy) {
|
||||
$deployment_uuid = new Cuid2;
|
||||
$deployment_uuid = new_public_id();
|
||||
|
||||
$result = queue_application_deployment(
|
||||
application: $application,
|
||||
@@ -3589,7 +3588,7 @@ class ApplicationsController extends Controller
|
||||
|
||||
$this->authorize('deploy', $application);
|
||||
|
||||
$deployment_uuid = new Cuid2;
|
||||
$deployment_uuid = new_public_id();
|
||||
|
||||
$result = queue_application_deployment(
|
||||
application: $application,
|
||||
@@ -3787,7 +3786,7 @@ class ApplicationsController extends Controller
|
||||
|
||||
$this->authorize('deploy', $application);
|
||||
|
||||
$deployment_uuid = new Cuid2;
|
||||
$deployment_uuid = new_public_id();
|
||||
|
||||
$result = queue_application_deployment(
|
||||
application: $application,
|
||||
|
||||
Reference in New Issue
Block a user