ohmage / server

The ohmage server application.
37 stars 25 forks source link

email addresses should not be treated case sensitively #805

Closed jshslsky closed 9 years ago

jshslsky commented 9 years ago

This is specifically related to inviting email addresses to ohmlets, but it is also good practice. There is a nice discussion on SO.

And here is the annoyance this causes in the current app:

I can recreate the "Please wait for Surveys to Synchronize ..." problem.

  1. Invite someone to an ohmlet using an email address that doesn't have an ohmage account.
  2. User clicks the join link on their device and opens the link using ohmage.
  3. User then proceeds to login with an account that already exists in ohmage, but with an account that has a different email address than what was invited. The server returns an error in this case, but the Android app does not handle it properly.

Once the Android app gets into the state described by (3) there is no getting out of it unless you sign out of the app.

So that is one issue.

The other nastier issue is that at on 7/21 Bob was invited to the three projects using BobBuilder@example.com. He was then invited to the same projects on 8/1 using bobbuilder@example.com. Normally this should not be a problem, but the server is treating the email addresses case sensitively and I am 99% sure that Bob clicked on an old invite link. His email text about it even reads that way.

When I told him to log out and then invited him again, he must've clicked the link in the new email.

The big bug here is that the server treats email addresses case-sensitively and it shouldn't.

sdanzig commented 9 years ago

The first part of the bug description, which doesn't relate to email case sensitivity, should be moved to another bug.