From 6bc2764c86bd4d80178b85546d28d351e11279e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ACncent=20Le=20Goff?= Date: Wed, 8 May 2024 15:45:47 +0200 Subject: [PATCH] Update kong/plugins/standard-webhooks/internal.lua Co-authored-by: Samuele --- kong/plugins/standard-webhooks/internal.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kong/plugins/standard-webhooks/internal.lua b/kong/plugins/standard-webhooks/internal.lua index 472a8f0d66ae..ad416e3f7282 100644 --- a/kong/plugins/standard-webhooks/internal.lua +++ b/kong/plugins/standard-webhooks/internal.lua @@ -64,12 +64,10 @@ local function access(config) local expected_signature = sign(config.secret_v1, id, ts, body) - if signature == expected_signature then - return + if signature ~= expected_signature then + kong.log.debug("signature not matched") + return kong.response.error(400) end - - kong.log.debug("signature not matched") - return kong.response.error(400) end return {