Page 1 of 1

reCAPTCHA doesn't work anymore

Posted: 08 Jun 2012, 22:06
by gerol80
Hi all,

I'm using Phoca Guestbook 1.5.3 on a Joomla! 1.5.26 installation (see http://www.ff-untereuerheim.de/, Service -> Gästebuch). Some weeks ago everything worked fine, but now reCAPTCHA is not working anymore. It always tells me that I entered the wrong words (although I'm pretty sure that I got it right at least for the more readable captchas). All other captchas (standard, math, or TTF) work fine.

It doesn't change anything whether I use JHTML or JRoute (by the way: I don't find anything on this setting in the documentation!?). I also checked the reCAPTCHA keys (private and public), and they're correct.

The interesting thing is that I'm also using reCAPTCHA for contact forms on the website (with the Joo Recaptcha plugin) – and here reCAPTCHA works. So there seems to be a problem specifically with the reCAPTCHA that is integrated in Phoca Guestbook.

Do you have any idea where I could have a look at? I understood that the request to Google's reCAPTCHA service is issued from the webserver (not the client). Can I somehow see what the guestbook is sending to Google and what the response is?

Any help will be appreciated!

By the way: I switched to another captcha type now so that the guestbook at least works. Thus, you cannot test anything. But looking at my next post, there's probably nothing more to test :)

Thanks and best regards,
Oliver

Re: reCAPTCHA doesn't work anymore

Posted: 08 Jun 2012, 22:34
by gerol80
Addendum:

I added some tracing to the recaptchalib.php method _recaptcha_http_post. This is the request it sends:

Code: Select all

POST /recaptcha/api/verify HTTP/1.0
Host: www.google.com
Content-Type: application/x-www-form-urlencoded;
Content-Length: 276
User-Agent: reCAPTCHA/PHP

privatekey=MyCorrectPrivateKey&remoteip=188.195.156.141&challenge=03AHJ_Vuvpp5K2
fxEUfdXqbh6QY77zFBp-E5fLICzhNnkSBiuMvDKud8T80QDhn9qCgyYds1ivCmbb3gdqC2aeHVMBit0N
ZiLBDsA_W3aogExtmDi3PYtPLS6UTbPG2mBDSASYlej0viia_2bEC9OS_ir5gViV79omqA&response=
givenunc+Second
And this is the response:

Code: Select all

HTTP/1.0 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Fri, 08 Jun 2012 20:26:10 GMT
Content-Type: text/plain
X-Recaptcha-Request-Duration: 14
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Server: GSE

false
incorrect-captcha-sol
So it really thinks that the solution was wrong. But I don't understand why ... the request looks correct to me.

Here is a request sent by Joo Recaptcha:

Code: Select all

POST /recaptcha/api/verify HTTP/1.0
Host: www.google.com
Content-Type: application/x-www-form-urlencoded;
Content-Length: 280
User-Agent: reCAPTCHA/PHP

privatekey=MyCorrectPrivateKey&remoteip=188.195.156.141&challenge=03AHJ_Vus31ElO
UkY4ISOVbVG2Dg01HiLsRedQOOpKDGW27KEXlwbmZ8J8OFcC9uGMC37Bs78pwTKq-6zWR3O5FKt75z2Z
LWc0rs1fN7aFtV1fH2oS7Jtt1Zxr2E8lsVR_dAuYUbJPVXqv7gRv_UexWfhGRlae53oKIA&response=
F%C3%B6rst.+fformek
And the answer:

Code: Select all

HTTP/1.0 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Fri, 08 Jun 2012 20:38:51 GMT
Content-Type: text/plain
X-Recaptcha-Request-Duration: 13
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Server: GSE

true
success
Although the request looks absolutely the same, here the answer is "success". I don't get it ...

Re: reCAPTCHA doesn't work anymore

Posted: 08 Jun 2012, 23:00
by gerol80
Okay, I found the problem when I looked again into my traces for Joo Recaptcha. For some mysterious reason, when I fill in the reCAPTCHA in the guestbook, the Joo Recaptcha code is also executed (apparently before the guestbook code) and it also sends the request to the Google servers. And of course, they return "success" only for the first request.

How is it possible that the guestbook reCAPTCHA triggers the Joo Recaptcha code?

Re: reCAPTCHA doesn't work anymore

Posted: 15 Jun 2012, 15:45
by Jan
Hi, in fact really no clue what can be the conflict there, I don't know Joo Recaptcha :-(

Jan