Skip to content

[Closed][Stale Code] Fix working of unique and exists #900

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

Closed
wants to merge 2 commits into from

Conversation

manan-jadhav
Copy link
Contributor

Before this, unique rule was case sensitive, that means it would pass strings with same chars but different case. Example, if [email protected] exists in database, applying unique rule on [email protected] SHOULD have failed, but it does not, since mongo is case sensitive, and case sensitiveness cannot be configured. See laravel/framework#9430. Also seen in #528

I've implemented a DatabasePresenceVerifier for mongodb, which overrides the default presence verifier, ONLY IF MongodbValidationServiceProvider is used. Also added test cases to make sure 'unique' and 'exists' validation rules function in a case insensitive manner.

This is an issue that affects almost all applications that would be using this plugin, and it is pretty serious.

Ping @jenssegers.

…work#9430 for mongodb. Also added test cases to make sure 'unique' and 'exists' validation rules function in a case insensitive manner
@pi0
Copy link
Contributor

pi0 commented Sep 1, 2016

There are breaking changes on master so unitTests are failing. would you please follow This steps to rebase this PR with master branch and running UnitTests against latest changes ?

Thanks :)

@manan-jadhav manan-jadhav changed the title [Bug Fix][Validation][Security] Fix working of unique and exists [Closed][Stale Code] Fix working of unique and exists May 21, 2017
@manan-jadhav
Copy link
Contributor Author

See #1196

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