Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account Sign Up: Can Enter The Same Email Address More Than Once (different cases) #2888

Closed
posixeleni opened this issue Jan 26, 2016 · 10 comments

Comments

@posixeleni
Copy link
Contributor

@pdurbin and I just spoke about this related issue #2879 (case sensitive password reset) and so I tried to create a second account with the same email address but with different cases.

example [email protected] and [email protected]

@posixeleni posixeleni added the Type: Bug a defect label Jan 26, 2016
@pdurbin
Copy link
Member

pdurbin commented Jan 26, 2016

#2170 about confirming email addresses is also related.

@eaquigley
Copy link
Contributor

@pdurbin will fixing this also fix the issue described in #2879?

@scolapasta can you check to make sure people aren't creating multiple accounts with the same email address just different cases?

@pdurbin
Copy link
Member

pdurbin commented Jan 26, 2016

@eaquigley it depends on how we fix it. I think I'd like to simply force all email addresses to be persisted to the database in their lowercase version. I don't know if users will object to this. Will they say, "Hey! I entered my email address as [email protected] and that's the way I likes it!"? They probably won't care if we change it to [email protected] but I don't know.

@raprasad said it should be a simple SQL query to check for multiple accounts with the same address.

@majorseitan
Copy link
Contributor

I went with the simple query fix. I added the create index scripts to the pull request just in case they were needed.

@pdurbin
Copy link
Member

pdurbin commented Jan 28, 2016

To be clear, the pull request @majorseitan is talking about is #2894. Thanks!

@majorseitan
Copy link
Contributor

This is addressed in pull request #2894

@majorseitan
Copy link
Contributor

Tested providing an email with a different case
The following query was run
SELECT ID, AFFILIATION, EMAIL, FIRSTNAME, LASTNAME, MODIFICATIONTIME, POSITION, SUPERUSER, USERIDENTIFIER FROM AUTHENTICATEDUSER WHERE (LOWER(EMAIL) = LOWER(?))
bind => [1 parameter bound]]]
resulting in the error
This email address is already taken

The normal work flow works and I was able to register by providing an email that was no already in the database.

@pdurbin
Copy link
Member

pdurbin commented Mar 2, 2016

@majorseitan I just noticed that you closed your old pull request at #2894. Is the new pull request at #2986 now your proposed fix for this issue? If so, can you please include #2888 under "Related Issues" at pull request #2986? Thanks!

@majorseitan
Copy link
Contributor

Corrected #2986 to point to this issue.

@kcondon
Copy link
Contributor

kcondon commented Mar 8, 2016

This is working, does not allow duplicate email of different case to be created, Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants