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

db: email comparison should be case insensitive #339

Merged
merged 7 commits into from
Mar 3, 2016

Conversation

ericchiang
Copy link
Contributor

Going to add a few tests and some additional documentation, but this provides a fix for #338 that does not require a database migration (e.g. lower casing all of the emails currently in the DB).

fixes #338

@bobbyrullo
Copy link
Contributor

Why aren't we instead preventing mixed case and doing the DB migration?

@ericchiang
Copy link
Contributor Author

Fine doing it both ways. Thought it might be rough to have a migration with a rolling upgrade. You'd be able to create a user with an invalid email on an old work, for instance.

@bobbyrullo
Copy link
Contributor

I think this needs to be two stages:

  1. stop allowing mixed case

after people have installed that release they can do a fix.

  1. new release with migration which fails if people haven't done the fix
    (we don't want this automated I think)

On Fri, Feb 26, 2016 at 2:35 PM Eric Chiang [email protected]
wrote:

Fine doing it both ways. Thought it might be rough to have a migration
with a rolling upgrade. You'd be able to create a user with an invalid
email on an old work, for instance.


Reply to this email directly or view it on GitHub
#339 (comment).

When reading migrations from files, sql-migrate attempts to split
SQL statements. The parsing logic does not handle $BODY$ statements
and broke when the migration included one.

Replace go-bindata with a small migration generation script and use
in memory migrations instead.
@ericchiang
Copy link
Contributor Author

ready for review @bobbyrullo

@bobbyrullo
Copy link
Contributor

Minor issues, otherwise LGTM!

ericchiang added a commit that referenced this pull request Mar 3, 2016
db: email comparison should be case insensitive
@ericchiang ericchiang merged commit 60b843e into dexidp:master Mar 3, 2016
@ericchiang ericchiang deleted the case_insensitive_emails branch March 9, 2016 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emails in dex are case sensitive
2 participants