Permalink
Browse files

[fix] it's named body in sanic

  • Loading branch information...
Psycojoker committed Feb 5, 2019
1 parent 0d746a6 commit 1b522269bb6f0497e1272750f198aba6e9ebe8ad
Showing with 1 addition and 1 deletion.
  1. +1 −1 server.py
@@ -39,7 +39,7 @@ def notify(message, chan="dev"):
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)

0 comments on commit 1b52226

Please sign in to comment.