ShelbyTV / shelby_gt

Rails API services for Shelby GT
2 stars 0 forks source link

Be more careful with/review approach to Frame#share email addresses #167

Open iceberg901 opened 12 years ago

iceberg901 commented 12 years ago

We don't vaildate email addresses submitted via Frame#share and SharingMailer seems to be fairly permissive about what kinds of addresses it will accept and say "mailed to" and then silently fail when the mail server itself can't deliver them.

The clients of our API are not necessarily strict about what email addresses they will submit. In particular, IE9 is no longer validating email addresses because it didn't support the HTML5-based approach we were using on the front end, and even that method is not that strict.

We need to answer the questions:

1) Who is responsible for deciding whether an email address is valid (front end? back end? mail server?) 2) Who needs to know if the email can't be delivered (front end? back end?)

In the IE9 example above, the user will have no idea if they tried to share to an invalid email address, because the client code isn't validating and the API doesn't return errors for bad email addresses on Frame#share

We need to modify the back end to support the desired behavior when those questions have been answered.