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

Evaluate using toLowerCase in backend API code #729

Open
zjmiller opened this issue Sep 6, 2019 · 1 comment
Open

Evaluate using toLowerCase in backend API code #729

zjmiller opened this issue Sep 6, 2019 · 1 comment

Comments

@zjmiller
Copy link
Contributor

zjmiller commented Sep 6, 2019

A case mismatch between an email address in a spreadsheet (with the first letter capitalized) and an email address in the database (with the first letter not capitalized) led us to lowercase all of the emails addresses associated with an API request before comparing them to email addresses in the database.

This was a temporary solution, though. What should the long-term solution be?

Some options:

  1. Leave all emails alone and force the spreadsheet owners to make corrections if there's a mismatch.
  2. Use some sort of case-insensitive pattern matching on the backend like Postgres ILIKE.
@brachbach
Copy link
Member

What's wrong with toLowerCasing them?

email addresses are case-insensitive, right?

I agree that something like 2. seems a bit more principled that toLowerCase, but IDK that it really matters

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

No branches or pull requests

2 participants