From a75d95a9b537c716cc0b0c9e37d4adcf6cd3944c Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 10 Jul 2026 17:28:49 +0530 Subject: [PATCH] fix: realign framework buildRuntime after allowlist filtering If the default buildRuntime is excluded by _APP_SITES_RUNTIMES, point it at the first remaining enabled runtime so clients do not preselect an invalid value. Co-authored-by: Cursor --- .../Platform/Modules/Sites/Http/Frameworks/XList.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php b/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php index 1be5199494..e49ace4486 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php @@ -69,6 +69,12 @@ class XList extends Base // Drop frameworks that have no enabled build runtimes left. if (empty($frameworks[$key]['runtimes'])) { unset($frameworks[$key]); + continue; + } + + // Keep the default buildRuntime aligned with the filtered allowlist. + if (!\in_array($frameworks[$key]['buildRuntime'] ?? '', $frameworks[$key]['runtimes'], true)) { + $frameworks[$key]['buildRuntime'] = $frameworks[$key]['runtimes'][0]; } } }