ma1uta / ma1sd

Federated Matrix Identity Server (formerly fork of kamax/mxisd)
GNU Affero General Public License v3.0
167 stars 56 forks source link

Make all 3PID address lowercase to avoid duplicates #38

Closed NullIsNot0 closed 4 years ago

NullIsNot0 commented 4 years ago

These changes complement #11 where locally saved e-mail address can be "name.surname@example.com", but e-mail address in LDAP can be "Name.Surname@example.com". They are treated as two different e-mail addresses and user gets 2 invitation notification e-mails. We change ThreePid model's address property to convert all info to lowercase and be915ae can do it's job better. The downside of this is that all medium addresses get converted to lowercase, not only e-mails. For now I can't think of any examples where medium values need to stay case sensitive.

NullIsNot0 commented 4 years ago

This probably can also fix #31. Unfortunately I can't test it myself as I have disabled external user registration.

NullIsNot0 commented 4 years ago

@ma1uta, is this going to be merged or I have to think about other solution to lowercase only e-mail addresses?

ma1uta commented 4 years ago

Thanks for PR!