Set new invite by email members to be downcase on insertion to database
Currently the members.invite_email
is stored in the database with case sensitivity.
That causes certain compatibility mismatches with how we store the user emails(they are all downcased on insertion). This also opens up the ability for duplicate invites to be created for what most email clients/relays consider to be the same email. i.e. bob@example.com
and BOB@EXAMPLE.COM
would be 2 invites currently and show up separately and possibly with different access levels and expiration dates. Interesting rfc documentation in https://datatracker.ietf.org/doc/html/rfc5321#section-2.4:~:text=Therefore%2C%20SMTP%20implementations,not%20case%20sensitive. However, our user and email models observe the construct of downcasing the emails on insertion, so we should follow that as a guide here.
See below:
Plan
Downcase for new members on insertion, pick up !151796 (merged) and finish, while being aware of the invite modal and error messages in general that will need addressed for this. In the below, the token should be red and the error message should contain the email.