We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c0bc3b commit b18396dCopy full SHA for b18396d
mystbin/backend/routers/admin.py
@@ -260,7 +260,7 @@ async def release_hook(request: MystbinRequest):
260
SECRET = config['github_secret'].encode()
261
262
received_sign = request.headers.get('X-Hub-Signature-256').split('sha256=')[-1].strip()
263
- expected_sign = HMAC(key=SECRET, msg=(await request.json()).encode(), digestmod=sha256).hexdigest()
+ expected_sign = HMAC(key=SECRET, msg=await request.body(), digestmod=sha256).hexdigest()
264
if not compare_digest(received_sign, expected_sign):
265
return UJSONResponse({"error": "Unauthorized"}, status_code=401)
266
0 commit comments