Help getting reCaptcha v3 to work?

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
rommeltje
Registered User
Posts: 48
Joined: Thu Aug 09, 2012 10:49 pm

Help getting reCaptcha v3 to work?

Post by rommeltje » Fri Jan 11, 2019 11:54 pm

Support Request Template
What version of phpBB are you using? phpBB 3.2.4
What is your board's URL? http://n/a
Who do you host your board with? Amerinoc
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What version of phpBB3 did you update from? phpBB 3.0-B1
What extensions do you have installed? Advanced BBCode Box 3.2.1
Board Announcements 1.1.0
Collapsible Forum Categories 1.0.3
External Links Open in New Window 1.0.6
Google Analytics 1.0.4
phpBB Media Embed PlugIn 1.0.2
Set forum width 1.0.1
Thanks for posts 2.0.6
VigLink
What styles do you currently have installed? SE Gamer: Light
What language(s) is your board currently using? British English
Which database type/version are you using? MySQL 5
What is your level of experience? Comfortable with PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? I decided to install reCaptcha V3.
Please describe your problem. Ok, so I'm probably an idiot, but I can't for the life of me figure out how to get Google reCaptcha to work. Can someone ELI5?

I've registered my site with Google reCaptcha, and gotten a public and a private key. I've entered those keys in the reCaptcha configuration in the Spambot Countermeasures of my ACP. The preview displays the message "ERROR for site owner: Invalid key type".

I figure I need to add some code to my files, as stated (I think) here: https://developers.google.com/recaptcha/docs/v3, but where? Which files? And where in those files?

And before anyone suggests I use the Q&A countermeasure instead: that's what I'm using now, and I'm under attack of a huge spam wave, so clearly it's not working.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66268
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Help getting reCaptcha v3 to work?

Post by Lumpy Burgertushie » Sat Jan 12, 2019 12:23 am

if the Q&a is not working then it is because your question is not good.

If you would give us a link to the board we could see what the problem is.

nothing wrong with using the recaptcha except that we have seen a lot of problems just like yours.

I have never used anything but the Q&A so I can't help you with the recaptcha.


robert
I am going to be out of town and off line for a week . see ya when I get back.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
EA117
Registered User
Posts: 606
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Help getting reCaptcha v3 to work?

Post by EA117 » Sat Jan 12, 2019 2:18 am

phpBB up to and including 3.2.5 does not appear to support reCAPTCHA v3, released by Google in October 2018.

The code provided by Google for reCAPTCHA v3 is not something you're expected to integrate into the phpBB site yourself. And phpBB doesn't "literally use" the recommended code you're being shown there, for what it's worth. Instead, phpBB utilizes the Google-provided reCAPTCHA PHP client (https://github.com/google/recaptcha) which is distributed as part of phpBB via the /vendor/google/ directory.

It order to update phpBB to support reCAPTCHA v3, the painless part is that phpBB will first need to consume the current reCAPTCHA PHP client. (phpBB 3.2.5 currently ships with the 1.1.2 September 2015 release, which pre-dates reCAPTCHA v3 release.) But then phpBB will need to update the reCAPTCHA plug-in for phpBB (/phpbb/captcha/plugins/recaptcha.php) to provide the reCAPTCHA v3-specific configuration in addition to existing v2 option. And then also update the captcha_recaptcha.html template provided in proSilver to successfully implement reCAPTCHA v3 usage, when enabled. These latter two steps are of course the "harder" and very phpBB-specific parts.

All of these points within current shipping phpBB releases are only suitable for invoking reCAPTCHA v2 usage, and do not conform to the mechanisms necessary to invoke reCAPTCHA v3 correctly. I have not attempted to set it up myself, but the "ERROR for site owner: Invalid key type" is presumably the correct and expected error for trying to feed the reCAPTCHA v3 API key (as you configured it in ACP) into the reCAPTCHA v2 mechanisms that phpBB currently tries to utilize that information in.


Searching on "reCAPTCHA" or "captcha" in Area51 discussion and tracker doesn't seem to confirm that reCAPTCHA v3 support is on the radar yet... Does anyone know otherwise, and can point to where I'm missing it? Else I'm sure we can get that entered, and see what the response and plans are. edit: https://tracker.phpbb.com/browse/PHPBB3-15937
Last edited by EA117 on Sun Jan 13, 2019 1:35 am, edited 1 time in total.

rommeltje
Registered User
Posts: 48
Joined: Thu Aug 09, 2012 10:49 pm

Re: Help getting reCaptcha v3 to work?

Post by rommeltje » Sat Jan 12, 2019 4:28 pm

Hmm, ok. Thanks for the info.

Yes, my Q&A question is probably too easy (it's "how many letters are in the site name?"). But what kind of question would be too hard for spambots, yet easy enough for real people wanting to register? If spambots apparently can read the question, wouldn't that make them able to answer any question that doesn't require expert knowledge?

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50423
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Help getting reCaptcha v3 to work?

Post by stevemaury » Sat Jan 12, 2019 4:32 pm

"How many" questions, like "what color" questions, allow the bots to just cycle through numbers and colors until they get a hit.

An example of a good question is (using this site as an example) "What is the first word beginning with "C" in this board's header? "

The answer is "creating". Note that this works best when the word is an image, not text.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

rommeltje
Registered User
Posts: 48
Joined: Thu Aug 09, 2012 10:49 pm

Re: Help getting reCaptcha v3 to work?

Post by rommeltje » Sun Jan 13, 2019 5:33 pm

Great advice, thanks! I'll fiddle around with the question a bit then.

BigDrago
Registered User
Posts: 319
Joined: Fri Dec 10, 2004 5:16 pm
Location: Norway

Re: Help getting reCaptcha v3 to work?

Post by BigDrago » Fri Jun 21, 2019 7:22 pm

Did u get v3 to work?

User avatar
Lumpy Burgertushie
Registered User
Posts: 66268
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Help getting reCaptcha v3 to work?

Post by Lumpy Burgertushie » Sat Jun 22, 2019 2:05 am

apparently it does not work in phpbb. best to use the Q&A or revert b ack to the recaptcha v2


robert
I am going to be out of town and off line for a week . see ya when I get back.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

BigDrago
Registered User
Posts: 319
Joined: Fri Dec 10, 2004 5:16 pm
Location: Norway

Re: Help getting reCaptcha v3 to work?

Post by BigDrago » Sat Jun 22, 2019 7:48 am

Do v2 work?

User avatar
EA117
Registered User
Posts: 606
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Help getting reCaptcha v3 to work?

Post by EA117 » Sat Jun 22, 2019 2:13 pm

Yes, reCaptcha v2 works, and is supported by Google in parallel to reCaptcha v3. We have reCaptcha v2 currently in use on our phpBB 3.2.7 board, using the built-in plug-in supplied with phpBB. The Google developer API account still lets you request new reCaptcha v2 keys as well.

Post Reply

Return to “[3.2.x] Support Forum”