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 cb786e8 commit c9ba4abCopy full SHA for c9ba4ab
app/tc2/views.py
@@ -27,6 +27,13 @@ async def callback(
27
"""
28
expected_sig = hmac.new(settings.tc2_api_key.encode(), (await request.body()), hashlib.sha256).hexdigest()
29
if not settings.dev_mode and (not webhook_signature or not compare_digest(webhook_signature, expected_sig)):
30
+ app_logger.info(
31
+ 'Unauthorized key, expected %s got %s. Using TC2 key ending with: %s',
32
+ expected_sig,
33
+ webhook_signature,
34
+ settings.tc2_api_key[-4:],
35
+ )
36
+ app_logger.info('Request body: %s', await request.body())
37
raise HTTPException(status_code=403, detail='Unauthorized key')
38
for event in webhook.events:
39
company, deal = None, None
0 commit comments