From cb2d0dc59277beee916365610bf78b9b351950e8 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 26 Mar 2025 09:07:38 +0200 Subject: [PATCH] adding custom domain validation against _APP_CUSTOM_DOMAIN_DENY_LIST --- app/controllers/api/migrations.php | 7 ++----- app/controllers/shared/api.php | 6 ------ src/Appwrite/Platform/Workers/Deletes.php | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 3312929894..4061f2c2c4 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -408,12 +408,9 @@ App::get('/v1/migrations/appwrite/report') ->inject('project') ->inject('user') ->action(function (array $resources, string $endpoint, string $projectID, string $key, Response $response) { + $appwrite = new Appwrite($projectID, $endpoint, $key); -// var_dump([ -// 'projectID' => $projectID, -// 'endpoint' => $endpoint, -// 'key' => $key -// ]); + try { $report = $appwrite->report($resources); } catch (\Throwable $e) { diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index cd9752ee24..0f39f29fe9 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -280,12 +280,6 @@ App::init() } if (empty($adminRoles)) { - var_dump([ - 'location' => 'api.php l291', - 'projectId' => !empty($project->getId()) ? $project->getId() : 'NA', - '$user' => $user, - '$team' => $team, - ]); throw new Exception(Exception::USER_UNAUTHORIZED); } diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index e5abe1e348..b5eccbf278 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -494,7 +494,7 @@ class Deletes extends Action */ protected function deleteProjectsByTeam(Database $dbForPlatform, callable $getProjectDB, CertificatesAdapter $certificates, Document $document): void { - var_dump('deleteProjectsByTeam appwrite CE'); + $projects = $dbForPlatform->find('projects', [ Query::equal('teamInternalId', [$document->getInternalId()]), Query::equal('region', [System::getEnv('_APP_REGION', 'default')])