Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RemoteEvent][Webhook] Fix SendgridRequestParser and SendgridPayloadConverter #59376

Merged

Conversation

ericabouaf
Copy link
Contributor

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues
License MIT

According to https://www.twilio.com/docs/sendgrid/for-developers/tracking-events/event#event-objects, not all webhook events contains a sg_message_id in the payload. In the case of a delayed or asynchronous bounce, the message ID will be unavailable.

The current implementation rejects the webhook call with "Payload is malformed".
We should use the always present sg_event_id instead.

For BC reasons, I did not want to change the id of the RemoteEvent, so I kept sg_message_id if present, but fallback to sg_event_id instead so that the webhook is not rejected.

@carsonbot carsonbot added this to the 6.4 milestone Jan 6, 2025
@OskarStark OskarStark changed the title [RemoteEvent][Webhook] fix SendgridRequestParser & SendgridPayloadCon… [RemoteEvent][Webhook] Fix SendgridRequestParser and SendgridPayloadConverter Jan 6, 2025
@nicolas-grekas
Copy link
Member

Thank you @ericabouaf.

@nicolas-grekas nicolas-grekas merged commit d6fa9a8 into symfony:6.4 Jan 7, 2025
10 of 11 checks passed
This was referenced Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants