fix: GitLab webhook validation (#7899)

This commit is contained in:
Andras Bacsai 2026-01-07 18:19:11 +01:00 committed by GitHub
commit 162e43a7fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,7 +100,7 @@ public function manual(Request $request)
}
foreach ($applications as $application) {
$webhook_secret = data_get($application, 'manual_webhook_secret_gitlab');
if ($webhook_secret !== $x_gitlab_token) {
if (! hash_equals($webhook_secret ?? '', $x_gitlab_token ?? '')) {
$return_payloads->push([
'application' => $application->name,
'status' => 'failed',