From 301fe9b5604dfda9a4297263fdd420f3baded56b Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 28 May 2026 22:41:33 +1200 Subject: [PATCH] revert: roll back VCS webhook signature ternary Empty secret is the intended opt-out for self-hosted deployments. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php index 5cb332efce..c79df05f8a 100644 --- a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php +++ b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php @@ -65,7 +65,7 @@ class Create extends Action $signature = $request->getHeader('x-hub-signature-256', ''); $secretKey = System::getEnv('_APP_VCS_GITHUB_WEBHOOK_SECRET', ''); - $valid = !empty($secretKey) && $github->validateWebhookEvent($payload, $signature, $secretKey); + $valid = empty($secretKey) ? true : $github->validateWebhookEvent($payload, $signature, $secretKey); Span::add('vcs.github.event.signature.valid', $valid); if (!$valid) {