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

[8.x][Security] Implement case insensitive function-based unique index. #599

Merged
merged 3 commits into from Nov 21, 2020

Conversation

yajra
Copy link
Owner

@yajra yajra commented Nov 21, 2020

A security patch for unique constraint to enforce case insensitive matching:

Example:

Before PR

Both users will be inserted without throwing a constraint error.

users: email (unique)

User::create(['email' => 'admin@example.com']);
User::create(['email' => 'Admin@example.com']);

After PR

User::create(['email' => 'admin@example.com']);
User::create(['email' => 'Admin@example.com']);

Error Message : ORA-00001: unique constraint (SCHEMA.USERS_EMAIL_UK) violated

NOTE

This patch only works on projects with fresh migrations. For existing projects, you need to create the unique index manually.

@yajra yajra added the bug label Nov 21, 2020
@yajra yajra changed the base branch from master to 8.x November 21, 2020 08:33
@yajra yajra merged commit 46e6f7b into 8.x Nov 21, 2020
@yajra yajra deleted the fix-ci-unique-index branch November 21, 2020 08:39
yajra added a commit that referenced this pull request Nov 21, 2020
* 8.x:
  Bump v8.1.1 🚀
  [8.x][Security] Implement case insensitive function-based unique index. (#599)
@yajra yajra restored the fix-ci-unique-index branch January 4, 2023 02:42
@yajra yajra mentioned this pull request Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant