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
An apparent backend change to the sendgrid webhooks implementation has resulted in a change to the case of the signature and timestamp headers. For example, the signature header previously was "X-Twilio-Email-Event-Webhook-Signature" but now is "x-twilio-email-event-webhook-signature".
The helper functions to access the keys for these headers now return the incorrect values. Attempting to access the signature using the key form the helper nib now results in an undefined value:
const sig = headers[EventWebhookHeader.SIGNATURE()] // sig === undefined
Steps to Reproduce
Set up webhooks and use the EventWebhookHeader.SIGNATURE() and EventWebhookHeader.TIMESTAMP() methods to extract the relevant header values.
Interesting. I wasn't aware of the change. Thanks for bringing this to our attention. For now, I recommend casting the strings to lowercase, like so: EventWebhookHeader.SIGNATURE().toLowerCase().
This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
Issue Summary
An apparent backend change to the sendgrid webhooks implementation has resulted in a change to the case of the signature and timestamp headers. For example, the signature header previously was "X-Twilio-Email-Event-Webhook-Signature" but now is "x-twilio-email-event-webhook-signature".
The helper functions to access the keys for these headers now return the incorrect values. Attempting to access the signature using the key form the helper nib now results in an undefined value:
const sig = headers[EventWebhookHeader.SIGNATURE()] // sig === undefined
Steps to Reproduce
Code Snippet
Header examples
9/28/2021
9/9/2021
Technical details:
*@sendgrid/eventwebhook: 7.4.5,
The text was updated successfully, but these errors were encountered: