When recaptcha makes the call to https://www.google.com/recaptcha/api2/userverify?k=
It comes back with this
)]}' ["uvresp",,,,2]
Granted with a valid k it comes back with a bit more. However the )]}' is clearly invalid json. When I try to retrieve the response with grecaptcha.getResponse() I get an empty string.
Same result when using curl.
Any help would be appreciated.
Actually the value returned is not valid json but well parsed by the Google's API.
Is it a protection ? I don't know, but if you look at the javascript, you can find that:
especially take a look at:
The parser explicitly checks that the value begins by
)]}
and strips it.I suggest you to just apply the same substring on the "json" string