From 1b522269bb6f0497e1272750f198aba6e9ebe8ad Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 5 Feb 2019 23:10:44 +0100 Subject: [PATCH] [fix] it's named body in sanic --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 565b980..ca7fee5 100644 --- a/server.py +++ b/server.py @@ -39,7 +39,7 @@ async def github(request): abort(501) # HMAC requires the key to be bytes, but data is string - mac = hmac.new(str(secret), msg=request.data, digestmod=hashlib.sha1) + mac = hmac.new(str(secret), msg=request.body, digestmod=hashlib.sha1) if not hmac.compare_digest(str(mac.hexdigest()), str(signature)): abort(403)