Skip to content

Commit

Permalink
Add debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
FreneticScribbler committed Jun 26, 2023
1 parent 55aa41a commit b5b8dc1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions RIGS/views/rigboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit b5b8dc1

Please sign in to comment.