You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some events don't have X-Hub-Signature in the header, which leads to a crash when trying to process that event:
Traceback (most recent call last):
File "/mnt/shared/home/boegel/.local/lib/python3.6/site-packages/pyghee/lib.py", line 168, in process_event
event_info = get_event_info(request)
File "/mnt/shared/home/boegel/.local/lib/python3.6/site-packages/pyghee/lib.py", line 33, in get_event_info
'signature-sha1': request.headers['X-Hub-Signature'],
File "/mnt/shared/home/boegel/.local/lib/python3.6/site-packages/werkzeug/datastructures.py", line 1397, in __getitem__
return _unicodify_header_value(self.environ[f"HTTP_{key}"])
KeyError: 'HTTP_X_HUB_SIGNATURE'
The code in get_event_info should be relaxed to take into account that X-Hub-Signature may not be available, and then the verification of the event should be skipped as well.
Example header of an event that doesn't have X-Hub-Signature:
It seems like this event was delivered for a repo that the app isn't supposed to get event deliveries for...
Not sure how that's possible, but the X-Hub-Signature field isn't there because the webhook doing the delivery is not configured with a webhook secret.
PyGHee should be tweaked to discard these events, since their payload can't be validated.
And maybe you should be able to configure PyGHee with a list of repositories that you want to accept event deliveries from as well.
Some events don't have
X-Hub-Signature
in the header, which leads to a crash when trying to process that event:The code in
get_event_info
should be relaxed to take into account thatX-Hub-Signature
may not be available, and then the verification of the event should be skipped as well.Example header of an event that doesn't have
X-Hub-Signature
:Payload:
The text was updated successfully, but these errors were encountered: