News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

reCAPTCHA for SMF

Started by 青山 素子, December 28, 2007, 12:16:40 PM

Previous topic - Next topic

Shambles

Quote from: szinski on August 21, 2019, 01:19:17 PM
I found a bug that prevents the verification questions from displaying properly (if enabled).

This line:

$qIndex = $verify_context['show_visual'] ? $i - 1 : $i;


Needs to be changed to:

$qIndex = ($verify_context['show_visual'] || $verify_context['use_recaptcha']) ? $i - 1 : $i;


in GenericControls.template.php


https://www.simplemachines.org/community/index.php?topic=213535.msg3992720#msg3992720

szinski

Thanks, looks I missed that and had to figure it out on my own.

shadav

I'm having an issue :) (imagine that)

so I turned of smf captcha and I turned off the questions
and enabled this mod

but when trying to register I keep getting

The following errors were detected in your registration. Please correct them to continue:
Please enter the verification code below to continue to the results.

yes I clicked the box that i'm not a robot but it still just keeps giving this error..... if i turn this mod off (no captcha's) registration works....but obviously I don't want to do that

2.0.15 (many many mods)

shadav

Quote from: shadav on October 03, 2019, 11:26:27 AM
I'm having an issue :) (imagine that)

so I turned of smf captcha and I turned off the questions
and enabled this mod

but when trying to register I keep getting

The following errors were detected in your registration. Please correct them to continue:
Please enter the verification code below to continue to the results.

yes I clicked the box that i'm not a robot but it still just keeps giving this error..... if i turn this mod off (no captcha's) registration works....but obviously I don't want to do that

2.0.15 (many many mods)

sorry to bump this, but can anyone try to help me with this?
I am not able to use smf captcha (not sure what broke that) and now this mod no longer works (not sure what broke it either)

dodos26

Quote from: Shambles on August 21, 2019, 01:32:10 PM
Quote from: szinski on August 21, 2019, 01:19:17 PM
I found a bug that prevents the verification questions from displaying properly (if enabled).

This line:

$qIndex = $verify_context['show_visual'] ? $i - 1 : $i;


Needs to be changed to:

$qIndex = ($verify_context['show_visual'] || $verify_context['use_recaptcha']) ? $i - 1 : $i;


in GenericControls.template.php


https://www.simplemachines.org/community/index.php?topic=213535.msg3992720#msg3992720


szinski this work for me:
$qIndex = ($verify_context['show_visual'] || $verify_context['use_recaptcha']) ? $i - 1 : $i;
Shambles this dont work for me:
$qIndex = $verify_context['use_recaptcha'] ? qIndex - 1 : qIndex;

How to create Recaptha + Visual + Question?

SN

Quote from: UbyXSofT on August 03, 2019, 11:32:18 AM
Quote from: vbgamer45 on March 17, 2019, 12:07:52 PM
Quote from: Shambles on December 23, 2018, 03:03:06 PM
What's your antispam setup configured as?

Mine is set to:

Use reCAPTCHA Verification System:    checked
Visual verification image to display:    none
Number of verification questions user must answer:    2

With those, the amendment I have in GenericControls.template.php is

// Where in the question array is this question?
$qIndex = ($verify_context['show_visual'] || $verify_context['use_recaptcha']) ? $i - 1 : $i;



... and it all works fine. For me. With those settings.
Thanks that worked for me..

Hi everyone,
I tried as described in the post above but it doesn't work for me...

I use SMF 2.0.15 and I have a problem, when I use the "recaptcha for smf" mod ... in the SMF AntiSpam settings i use these settings: "img. cattura0"... And I get this error: "img. cattura2"... I believe the error refers to the response field I don't answer "Img. cattura1", but I don't have any questions set, do you think I am wrong in the configuration? ... or is it a problem of the mod or of the theme or of SMF? ... Is there a way to solve this problem? Thanks for any suggestions

Im getting the same issue also. I tried the suggested solutions. Still not working for me

statusjpn

Tried @Shambles' fix and it only fixed part of the issue.

1) Previously when i enable reCAPTCHA and had a question, the question appeared blank with only the answer box - this has now been FIXED with @Shambles' post and the security question appears correctly

2) However, after clearing the reCAPTCHA and answering the security question, it still prompts the error:

QuoteThe following errors were detected in your registration. Please correct them to continue:
The letters you typed don't match the letters that were shown in the picture.

Anyone has a fix for problem #2?

cortez


https://xxx/forum/index.php?action=register2
2: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0
File: /home/xxx/public_html/forum/Sources/recaptcha/ReCaptcha/RequestMethod/Post.php
Line: 68


with following:

https://xxx/forum/index.php?action=register2
2: file_get_contents(https://www.google.com/recaptcha/api/siteverify): failed to open stream: no suitable wrapper could be found
File: /home/xxx/public_html/forum/Sources/recaptcha/ReCaptcha/RequestMethod/Post.php
Line: 68


fopen is "on"
This happened after update to 2.0.17 and enabling PHP 7.2

Any ideas?

Thanks

Shambles

Quotefopen is "on"

You need to confirm that by doing a phpinfo and examining the output.

What is a phpinfo() file?

cortez

Actually hosting overrides fopen parameter to be off for security reasons, so you are right.

There are apparently fixes for recaptcha which removes that dependency on fopen parameter:
https://github.com/q2a/question2answer/issues/300

cortez

Fixed by integrating latest request/response files from github:
https://github.com/google/recaptcha/tree/master/tests/ReCaptcha

Error not occuring anymore, fopen is still off for logical security reasons.

Thaxos

After installing this mod it drastically cut down on the spambots however I still find my forum receiving around 1-3 spam users a day...

Verified that the reCaptcha is indeed working on registration, but some are getting by somehow.

Any thoughts on how this might be occurring?

Kolya

It happens because these "spambots" are actually humans. There is a whole industry in low wage countries that employs people to act as spammers or to let spambots into websites, past any bot counter measures.

Accordingly these cannot be beaten with automated tests. They can however be beaten rather easily with human interaction. For example you can add a text field to your registration form (doesn't require any mods) and ask people to explain why they want to join your forum. Then review these submissions.

Thaxos

Unfortunately the volume of users registering makes that prohibitive due to how much time that would take to review pending new users.

青山 素子

The older image-based (or audio-based) reCAPTCHA methods (known now as reCAPTCHA v2) is broken because human labor in some countries is cheap and spammers have been using humans to solve them for over a decade. Heck, this article is nearly 12 years old: Inside India's CAPTCHA solving economy.

The newer reCAPTCHA v3 is an interesting development, but due to the way SMF works, not an easy thing to implement. At the very least, I don't have the time to implement it. It's also partly why some of the remaining issues with this modification haven't been revisited.

The best anti-spam solution to SMF at the present time is to use the anti-spam question feature. Put in some solid questions about your forum, something that's not general knowledge (no "what color is the sky", more "name the anime series created by Rumiko Takahashi that starts with the letter U") and might require either knowledge of your forum's subject or at least some searching. Spamming is a high-volume low-cost business. Spamming software will often have databases of general knowledge questions and answers for forums that use this type of protection, but not for more specialized ones. If you do this, you'll have a lot less of a spam problem. Just change your questions out once you start noticing an uptick in spammers.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


cortez

#955
I finally managed to fix your mod to work properly with fopen=0 with following change in Subs-Editor.php:

$recaptcha = new \ReCaptcha\ReCaptcha($modSettings['recaptcha_private_key'], new \ReCaptcha\RequestMethod\SocketPost());

I've tested it now and with SocketPost and fopen=0 works fine.

Can you please update mod? Since fopen=on is security risk.

Thanks.



sirfpsycho

The following error or errors occurred while posting this message:
The letters you typed don't match the letters that were shown in the picture.

From some days I am getting this error. Before it was working fine. I have deleted the site from google captcha and added again but still same issue. I am using v2 because v3 is not working.

Electrohaxer1971

Hi there guys,

Btw, I have no mods installed, just this one that has been downloaded (2.0.0) but not installed. And I'm using SMF 2.0.17.

I'm trying to install reCAPTCHA and it's saying that there is an error in the package installation. Specifically, it has a problem with the line in this file called GenericControls.template.php. It wants to replace the line that says:

if ($i == 0 && $verify_context['show_visual'])

With:

elseif ($i == 0 && $verify_context['show_visual'])

If I'm reading this correctly, the only thing that is changing is 'if' to 'elseif'. But here's the funny thing, and maybe the reason why it's failing on this replace check, the line it wants to replace doesn't exist. This line has already been changed to 'elseif'. I downloaded the file and did a search. Is this why it's failing? Should I just go ahead and say 'Install Now' despite the "error"?


Мel

Quote from: sirfpsycho on July 23, 2020, 02:07:56 AM
The following error or errors occurred while posting this message:
The letters you typed don't match the letters that were shown in the picture.

From some days I am getting this error. Before it was working fine. I have deleted the site from google captcha and added again but still same issue. I am using v2 because v3 is not working.
The same error appeared recently.
"The ability to speak does not make you intelligent."
- Qui-Gon Jinn

white-k

Quote from: Мel on October 18, 2020, 05:45:42 AM
Quote from: sirfpsycho on July 23, 2020, 02:07:56 AM
The following error or errors occurred while posting this message:
The letters you typed don't match the letters that were shown in the picture.

From some days I am getting this error. Before it was working fine. I have deleted the site from google captcha and added again but still same issue. I am using v2 because v3 is not working.
The same error appeared recently.

I also get this.
Has anyone found a solution to this?

Advertisement: