Skip to content

Commit 43ab88a

Browse files
Fixed typo bug with HMAC / Secret enforcement.
1 parent 2de5778 commit 43ab88a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webhooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def index():
7373
if sha_name != 'sha1':
7474
abort(501)
7575

76-
# HMAC requires its key to be bytes, but data is strings.
77-
mac = hmac.new(secret, msg=data, digestmod=sha1)
76+
# HMAC requires the key to be bytes, but data is string
77+
mac = hmac.new(secret, msg=request.data, digestmod=sha1)
7878
if not hmac.compare_digest(mac.hexdigest(), signature):
7979
abort(403)
8080

0 commit comments

Comments
 (0)