greggilbert / recaptcha

[ABANDONED] reCAPTCHA Validator for Laravel 5
MIT License
713 stars 196 forks source link

Invalid Response #93

Closed addingama closed 9 years ago

addingama commented 9 years ago

Hi, I've been using this library for a while now and there is no problem, but suddenly starting this morning, the capcha validation always fail. I don't know what the problem is.

dharmendrajadon commented 9 years ago

It stopped working on all my websites. Even the Laravel 4.1 code stopped working too.

greggilbert commented 9 years ago

I just tried it out and it seemed fine. Can you give me some details about what you're seeing - errors, e.g.?

addingama commented 9 years ago

There is no error. Just this message "The g-recaptcha-response field is not correct." That message always show even if I answer the capcha correctly fireshot screen capture 009

dharmendrajadon commented 9 years ago

Any progress on the issue? All of my websites are on stack!

greggilbert commented 9 years ago

Sorry, but I'm not able to replicate the bug. Has anything changed in your server config? Can you check the logs and see if there's anything in there? Go into the plugin and dump out the response from Google? I need something to go on.

addingama commented 9 years ago

Hi greg, I've checked the log and there is this chunk of error message

[2015-10-28 10:28:11] production.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php:148
Stack trace:
#0 D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Routing\Router.php(1054): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))
#1 D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Routing\Router.php(1022): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
#2 D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Routing\Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#3 D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#4 D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#5 D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Session\Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#6 D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Cookie\Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#7 D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Cookie\Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#8 D:\Workspace\Web\laravel-smash\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#9 D:\Workspace\Web\laravel-smash\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#10 D:\Workspace\Web\laravel-smash\public\index.php(49): Illuminate\Foundation\Application->run()
#11 {main} [] []

I don't know what it means

I also try to debug the plugin in checkrecapchav2 an v1 .php

this is what i got in curl $checkResponse variable

string '{
  "success": true
}' (length=21)

and the "The g-recaptcha-response field is not correct." sill shows up

I've tried using v1 and i'm sure the answer is true but still not correct

dharmendrajadon commented 9 years ago

Its working on my VPN server but not on shared server. The same scripts, everything same.

Hendriksie commented 9 years ago

Hi,

I just used this component for the first time and it works perfectly.

I think it has to do with your own config, recheck the public and private keys you registered at google.

Best Regards,

Wesley Hendriks

dharmendrajadon commented 9 years ago

Nothing has been changed on websites. I have a dozen of websites running same code. It was working good until 2 days ago.

I haven't changed anything on any website in these two days. It suddenly stopped working. Invalid Response. That's it.

But its working on one of my VPN hosted website. Not on Shared Hosting from Hostgator.

I have many shared hosting accounts. None of them are working with Recaptcha.

greggilbert commented 9 years ago

@dashracer - the fact that it returned success means that the recaptcha is working, so my guess is that there's some other issue with your form or something like that.

@dharmendrajadon - what is saying "Invalid response"? Is that the $checkResponse value?

dharmendrajadon commented 9 years ago

I have figured it out. The reason behind all mass failure is that Hostgator did an update on servers and blocked all scripts.

It has blocked even SMTP mail servers. You have to ask them to allow Google ReCaptcha script through their firewall.

It will work. Good Luck.

@greggilbert Thank You for your support

greggilbert commented 9 years ago

Ouch. Well, that'll do it.

I'm going to close this ticket.