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

Fixes underscore treated as wildcard in emails #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matt-in-a-hat
Copy link

Duplicate of #178 but rebased on latest, reopening to hopefully get traction. Even if it's due to a framework issue under the hood, this alternative certainly works.

In a project we are using this module, and having issues with users unable to sign up if their email address has an underscore in it and closely matches an existing email in the system. After a bit of digging, I found that the LIKE operator in Postgres and MySQL uses underscore as a single character wildcard.

It seems the SilverStripe ORM's 'nocase' modifier must use a LIKE query under the hood, at least in MySQL backends.

Email addresses like 'me2@me.com' and 'm_2@me.com' should not match, but they do with filter('Email:nocase')

The 'nocase' modifier must use a LIKE query under
the hood, at least in MySQL backends. Emails like
'me2@me.com' and 'm_2@me.com' should not match,
but they do with `filter('Email:nocase')`
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.

2 participants