Page 1 of 1

IIncorrect SPAM Prevention answer, please try again.

Posted: Mon Jul 27, 2015 6:06 pm
by vinman57
Script URL: http://www.cybermidi.com/helpdesk
Version of script: 2.6.2
Hosting company: powweb
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: incorrect spam prevention

Write your message below:

I upgraded to 2.6.2 (and now just to 2.6.4)

Trying to implement recaptcha 2.0 - but I get the error incorrect spam prevention answer even though I have the question set to off. (I've double and triple checked the keys and debug mode didn't show anything useful)

thanks
Vin

Re: IIncorrect SPAM Prevention answer, please try again.

Posted: Mon Jul 27, 2015 6:43 pm
by Klemen
Can you try with original unodified HESK files?

Re: IIncorrect SPAM Prevention answer, please try again.

Posted: Mon Jul 27, 2015 7:00 pm
by mkoch227
There is an issue with some users using recaptcha 2.0 who have file_get_contents for remote addresses disabled in their PHP installation. Since the 2.0 lib uses file_get_contents to an external call, the call to the recaptcha API returns false, which HESK (correctly) interprets as an incorrect SPAM answer. A way to check if this is the case is to create a php file that simply calls phpinfo(). Then, load that page, and look for "allow_url_fopen".

If you are unable to enable allow_url_fopen, you can try using this implementation of the lib I modified which attempts to call the API using curl. If curl isn't available, it then uses file_get_contents. You can download it at https://raw.githubusercontent.com/mkoch ... lib_v2.php and then replace your recaptchalib_v2.php file in /inc/recaptcha.

Re: IIncorrect SPAM Prevention answer, please try again.

Posted: Mon Jul 27, 2015 8:09 pm
by vinman57
Thank you! That worked

My only concern is remembering the fix when hesk is updated so it's not overwritten.

thanks again
Vin

Re: IIncorrect SPAM Prevention answer, please try again.

Posted: Mon Jul 27, 2015 9:02 pm
by Klemen
Thanks for the heads-up, I will include this in the next HESK release.

Re: IIncorrect SPAM Prevention answer, please try again.

Posted: Tue Sep 15, 2015 6:38 pm
by vinman57
Kleman

Just upgraded to 2.65. Unfrortunaly, the previous fix was overwritten in upgrade and it looks like you didn't include it with release as the incorrect spam prevention answer bug is back

https://raw.githubusercontent.com/mkoch ... lib_v2.php

is now a bad link.

Can I get that file?

thanks
Vin

Re: IIncorrect SPAM Prevention answer, please try again.

Posted: Tue Sep 15, 2015 8:35 pm
by mkoch227
Here you go:

https://raw.githubusercontent.com/mkoch ... lib_v2.php

The link broke when I deleted the curl-for-recaptcha branch, but the master branch is here to stay for the foreseeable future :D

Re: IIncorrect SPAM Prevention answer, please try again.

Posted: Tue Sep 15, 2015 10:05 pm
by vinman57
Hmm, still not working.

http://www.pianowizardacademy.com/helpd ... .php?a=add

This seems to have happened just starting today. I thought it may have been the update. But it is happening to me on two different domains.

Any ideas?

thanks

Re: IIncorrect SPAM Prevention answer, please try again.

Posted: Wed Sep 16, 2015 8:19 am
by Klemen
I forgot about this, yes, sorry.

Mike's mod should work though. Try with a clean HESK installation in a test folder, to make sure your modifications are not preventing this from working.

So, try:
- install original HESK in a new test folder
- upload Mike's mod
- test