1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fix 4549 webhook body encode in utf-8

This commit is contained in:
kobayashi
2020-04-29 00:06:26 -04:00
parent 4971054c34
commit 39ea14202e
3 changed files with 3 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ def generate_signature(request_body, secret):
"""
hmac_prep = hmac.new(
key=secret.encode('utf8'),
msg=request_body.encode('utf8'),
msg=request_body,
digestmod=hashlib.sha512
)
return hmac_prep.hexdigest()