From b5b8dc104c22536be716be22b1f6e09a9b4cef2f Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Tue, 27 Jun 2023 00:42:45 +0100 Subject: [PATCH] Add debug print --- RIGS/views/rigboard.py | 1 + 1 file changed, 1 insertion(+) diff --git a/RIGS/views/rigboard.py b/RIGS/views/rigboard.py index 59bc8bbe..096fea86 100644 --- a/RIGS/views/rigboard.py +++ b/RIGS/views/rigboard.py @@ -411,6 +411,7 @@ def dispatch(self, request, *args, **kwargs): def post(self, request, *args, **kwargs): hmac = hmac.new(env('FORUM_WEBHOOK_SECRET').encode(), request.body, hashlib.sha256).hexdigest() computed = f"sha256={hmac}" + print(computed) if not hmac.compare_digest(request.POST.get('X-Discourse-Event-Signature'), computed): return HttpResponseForbidden('Invalid signature header') body = json.loads(request.body.decode('utf-8'))