pboling / sanitize_email

An Email Condom for your Ruby Server
http://railsbling.com/sanitize_email/
MIT License
167 stars 36 forks source link

Add support for sanitizing personalization fields from SendGrid #74

Closed joeyparis closed 6 months ago

joeyparis commented 3 years ago

This adds support for sanitizing the personalizations field used by Twilio's SendGrid API. Fixes #73.

I'm not sure how to properly go about testing since the personalizations field isn't built into the default Ruby Mail::Message class.

I also understand if this technically falls out of the scope of this gem since it only applied to using SendGrid. I could probably make it as a sort of gem "add-on" if that would be welcomed. Definitely open to feedback!

joeyparis commented 3 years ago

I updated my code to satisfy houndci, but it conflicts with a lot of rubocop rules as well as the rest of the existing code. I'll open a bug report.

joeyparis commented 3 years ago

I made houndci and rubocop as close together as I could. Still not a 100% pass rate, but I think this is the best we can do without needing to run rubocop against the existing code

pboling commented 6 months ago

So sorry I didn't see this sooner. My notifications stream is a mess. Merging, and will have a new release out soon

pboling commented 6 months ago

@joeyparis Fix was released in 2.0.4 but I forgot to add it to CHANGELOG.md, so that will be fixed in the next release.

joeyparis commented 6 months ago

No worries! I know I have my fair share of outstanding gem pull requests I need to address too. Happy I can move back to an official gem version rather than my deviation (which for your confidence we've been using in production since this PR with no issues). Thanks for merging and following up!