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

Laravel 5.7 captcha validation strange issue #154

Open
dbulan opened this issue Dec 12, 2018 · 1 comment
Open

Laravel 5.7 captcha validation strange issue #154

dbulan opened this issue Dec 12, 2018 · 1 comment

Comments

@dbulan
Copy link

dbulan commented Dec 12, 2018

I'm using Laravel 5.7 and PHP 7.2.4

My project have captcha on two pages: default page (where user can sign-in) and registration page.
In default page captcha validation works correctly, but in registration page validation always fails.

I spent a lot of time to find out what is going on.
My solution is:

  1. open vendor/mews/captcha/src/Captcha.php
  2. Find check($value) function, in my case line:428
  3. Comment this line: //$this->session->remove('captcha');
  4. Profit

I don't know why, but after that captcha works correctly in both pages.

@kiyana76
Copy link

i have this problem and i found the solution...when once you use captcha for example for login if you use captcha in another page session variable 'captcha' not clear and validation failed therefor i use

\Session::forget('captcha');

before load page that i used captcha in it.

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