From 901a924af75572fde3eab4a7b368394e3c5767c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 26 Aug 2025 12:53:25 +0200 Subject: [PATCH] PR review changes --- src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php index 4f197fcd79..b67a42adb1 100644 --- a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php +++ b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php @@ -74,10 +74,12 @@ class Get extends Action $restrictions = []; if (!empty($sitesDomain)) { + // Ensure site domains are exactly 1 subdomain, and dont start with reserved prefix $domainLevel = \count(\explode('.', $sitesDomain)); $restrictions[] = DomainValidator::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); } if (!empty($functionsDomain)) { + // Ensure function domains are exactly 1 subdomain $domainLevel = \count(\explode('.', $functionsDomain)); $restrictions[] = DomainValidator::createRestriction($functionsDomain, $domainLevel + 1); }