View Thread
 Print Thread
Google reCAPTCHA v2 API
skpacman
Also added a thread to main

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
KasteR
I'll assume we can use this thread for in-house testing. I will post my findings here, unless you prefer otherwise.

One thing I found immediately, is actually quit silly ha. Minor change.

infusions\grecaptcha\infusion.php:

// Infusion general information
$inf_title = $g_locale['inf_title'];
$inf_description = $g_locale['inf_desc']
$inf_version = "0.0.3a";
$inf_developer = "skpacman";
$inf_email = "";
$inf_weburl = "http://php-fusion.us";
$inf_folder = "grecaptcha";

Change to:

// Infusion general information
$inf_title = $g_locale['inf_title'];
$inf_description = $g_locale['inf_desc'];
$inf_version = "0.0.3a";
$inf_developer = "skpacman";
$inf_email = "";
$inf_weburl = "http://php-fusion.us";
$inf_folder = "grecaptcha";


$inf_description was missing the trailing ; causing the page to not parse. I'm going to go through the rest and post anything else momentarily.

Edit:
Ok so everything is looking good aside from what I mentioned above.

I'm pleased to see that the recaptchalib.php is working. If you try to submit the form by manually enabling the submit button via jQuery, it will not allow submission without a successful response from Google.

Good work here, despite the circumstances in between. I'd like to see how others respond, if they choose to test.
Edited by KasteR on 01-21-2015 09:35
 
http://kaster.us
skpacman
Fixed and re-uploaded to main.

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
Quartzkyte
Hi,
The thread on main is titled as Alpha.
Is there a final version of this, I would need it as Google is bugging me to go from reCAPTCHA to v2?
Thank you.
Still me from the original French NSS crew Smile but I still don't have the admin keys to revive it Sad
 
http://surgele.free.fr
NetriX
This download is the final version I believe. Hmm..
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the [url=https://php-fusion.co.uk/articles.php?cat_
 
https://netrixhosting.com
skpacman
Yep. I had completely forgotten about it on Main. I need to upload it to the AddonDB

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
Quartzkyte
Hi skpacman,

If you have a moment I'd need your help troubleshooting this:
www.corpfrance.com/_images/errorlog.jpg

I don't have a clue to where this is...

Besides, here is a French locale:


/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: English.php
| Author: skpacman
| Copyright 2015 Stephen D King Jr
+--------------------------------------------------------+
| This integrates the NEW reCAPTCHA Google API v2 into
| PHP-Fusion using the built-in PHP-Fusion captcha system
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); } //No outside access...

//$g_locale[] = "";

//Generic
$g_locale['inf_title'] = "Google reCAPTCHA v2 API";
$g_locale['inf_desc'] = "L'API de Google pour le nouveau système reCAPTCHA \"Facile pour les humains, dur pour les robots.\"";

//Infuse
$g_locale['infuse']['title'] = $g_locale['inf_title']." infusée";
$g_locale['infuse']['infused'] = "Vous venez d'installer ".$g_locale['inf_title']."

Ce reCAPTCHA a déjà été validé pour les réglages de ce site,

il ne vous reste plus qu'à obtenir les codes de Google et les insérer dans le panneau d'administration de l'infusion.

Dans 20 secondes vous serez dirigé vers le panneau d'administration de l'infusion.";

//Defuse
$g_locale['defuse']['title'] = $g_locale['inf_title']." defusée";
$g_locale['defuse']['defused'] = "Vous venez de désinstaller l'infusion ".$g_locale['inf_title'].".

Votre captcha a été restauré à ses réglages précédents.
";

//Admin Page
$g_locale['admin']['infused'] = "Vous venez d'installer l'infusion ".$g_locale['inf_title']." !

Les réglages de votre page de sécurité ont été changés pour vous.

Maintenant cliquez sur le bouton \"Obtenir mes Codes\"  ci-dessous et demandez vos codes à Google.

Si vous les avez déjà, connectez-vous.

Entrez les codes ci-dessous et cliquez sur Envoyer. Ce message disparaîtra et votre captcha devrait fonctionner";
$g_locale['admin']['settings_success'] = "Réglages enregistrés correctement.";
$g_locale['admin']['settings_problem'] = "Il y a eu un problème à l'enregistrement des réglages.";
$g_locale['admin']['settings'] = $g_locale['inf_title']." Réglages";
$g_locale['admin']['no_keys'] = "Il semble que vous n'ayez pas encore vos codes. ";
$g_locale['admin']['review_keys'] = "
";
$g_locale['admin']['site_key_placeholder'] = "très_long_CODE-DU-SITE_de_reCAPTCHA";
$g_locale['admin']['site_key'] = "Code Site";
$g_locale['admin']['secret_key_placeholder'] = "très_long_CODE-SECRET_de_reCAPTCHA";
$g_locale['admin']['secret_key'] = "Code Secret";
$g_locale['admin']['wait_seconds_title'] = "Dur?e de l'animation pendant le remplissage.";
$g_locale['admin']['wait_seconds_label'] = "Attente (en secondes)";
$g_locale['admin']['theme_light'] = "clair";
$g_locale['admin']['theme_dark'] = "foncé";
$g_locale['admin']['submit'] = "Envoyer";
   
//captcha_display
$g_locale['display']['recaptcha_label'] = "Google reCAPTCHA";
$g_locale['display']['error'] = "Cliquez dans la bo?te et si besoin est, remplissez le code captcha.";
?>


Thank you...
:)
Still me from the original French NSS crew Smile but I still don't have the admin keys to revive it Sad
 
http://surgele.free.fr
skpacman
I haven't had time to look at it yet. Been busy with the holiday, being sick, and family drama. I'll get to it later today or tomorrow morning.

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
skpacman
Sorry it took a while to get back to you.
That error can be safely ignored. That line is in there to handle the contact.php submit button jquery. I'll add some logic and re-upload to GitHub.

I also re-evaluated the current version in our downloads db and found it's Kaster's version, not mine. That'll be corrected soon as well.

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
skpacman
I updated this on GitHub. I'll be submitting it to Main and our own DB shortly.

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
Quartzkyte
Thank you.
Hope the family drama & health issues get better Wink
Still me from the original French NSS crew Smile but I still don't have the admin keys to revive it Sad
 
http://surgele.free.fr
skpacman
A new version of the recaptcha backend has been released on github (like 2 months ago?!?!?!? and I didn't know about it??!?!??!). I'm going to work on incorporating that into my addon here soon and releasing a v2.0. Maybe that will fix some of the issues some people are having...

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
Ralph68
Hi Guys,

I been having a problem with Bots from Poland registering and spamming my website. I dl the latest version from Github, problem is I have these 5 errors in my error log. I took screen shots for you to see. Any help is appreciated! Thank you.

Error 34
Error 104
Error 106
Error 115
Error 117
Regards,
Ralph68
www.10secrides.com/downloads/Smileys/peace.gif
 
http://10secrides.com
skpacman
It looks like it had trouble reading $g_settings

Delete those error entries, log out of your site and view the register.php or contact.php page with the new captcha, register a fake account or send a contact message through contact.php, then log back in as your admin and see if the errors came back. If so, let me know.

Those are a common issue and I believe it has to do with someone viewing the captcha before it's actually installed. It happens on all kinds of sites, not just high traffic ones.

Let me know what you come up with.

Also, as with any captcha, it's not perfect. It's maintained by Google so if any bots get past it, blame them. We have the same problem, too.

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
Ralph68
I deleted the errors and tried sending a message through contact, this is what I got when I clicked send. I tried many times, selecting the correct images each time.

Your message was not sent for the following reason(s):
You must enter correct Validation Code
Please try again.


I tried registering a fake account but got this message despite entering the correct validation code many times.

Registration failed for the following reason(s):
Incorrect validation code.
Please Try Again.


Four of the previous line errors came back and one new one, below.
Error 124
Regards,
Ralph68
www.10secrides.com/downloads/Smileys/peace.gif
 
http://10secrides.com
skpacman
I can't imagine what's going wrong.

The only solution I can think of at the moment is a full re-install.

Quote

  1. Go to Admin Panel -> Settings -> Security and change the Captcha Type to something else
  2. Go to Admin Panel -> System Admin -> Infusions and defuse the infusion
  3. Open a file editor for your website and delete the folders (and their contents) /includes/captchas/grecaptcha and /infusions/grecaptcha
  4. Download the lastest .zip of the addon
  5. Extract and upload the contents to your site's root
  6. Go back to Admin Panel -> System Admin -> Infusions and infuse the addon
  7. Observe the notice at the top and wait for the timer. It should forward you after the timer.
  8. Grab your codes from the recaptcha site and put them in the appropriate boxes in the page after the timer.
  9. change the other settings as needed and save


After the above process, go back to your error log and empty it and test again, then let me know what happens.

I have a couple theories.

Either there's something else on your site that's interfering with the noCaptcha (more likely), or there's something going wrong with the install and/or the javascript that runs the whole thing (less likely). The code in recaptchalib.php, and captcha_check.php are supplied by google so I doubt it's any of their code going wrong.

I have another version that's been sitting around, I just have to properly package it before I let anyone else have it...

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
Ralph68
Not sure what went wrong but it seems okay now, user error. Maybe.. possibly I put in the security key incorrect? idk but it's working.

I am able to send a message from contact and register fake account no problem. There are no errors at this time.

Thanks very much!
Regards,
Ralph68
www.10secrides.com/downloads/Smileys/peace.gif
 
http://10secrides.com
Ralph68
Looks like the line errors are back. 34, 104, 106, 115, 117 and a new one.

Error 160

Google reCAPTCHA v2 seems to be working okay, I can send a message through Contact and am able to register a fake account no problem but the line errors are still there. If there's anything I can do to help clear these up let me know.
Regards,
Ralph68
www.10secrides.com/downloads/Smileys/peace.gif
 
http://10secrides.com
skpacman
After checking on my own sites that have the same version you do, no errors were produced under normal circumstances. (a typical human user in a common browser with typical settings viewing the page normally)

I'll keep an eye on access to those pages and see if there's a correlation between bots or certain browsers or types of devices that cause the error.

It looks like there's something interfering with how the page pulls the settings from the database, which shouldn't seem possible...

You can safely ignore the errors for now as long as nothing on the site is being interrupted.

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
http://www.skpacman.com
Quartzkyte
Hi skpacman,
I have a question (again! Frown): now the infusion works fine, but something not directly related is annoying for me:
when there is an error in the form, I used to have a js history redirect for people to correct the error.
The grecaptcha does not display again and I can't find where to reset the grecaptcha.
Any idea?
TIA Smile
Still me from the original French NSS crew Smile but I still don't have the admin keys to revive it Sad
 
http://surgele.free.fr
Jump to Forum
Similar Threads
Thread Forum Replies Last Post
reCAPTCHA v3 [7.02.XX] Other / Integrations / Images 1 12-23-2018 19:40
[GUIDE] Speedup Google Chrome General Chat 1 06-08-2015 22:29
Google Adsense help General Chat 3 04-12-2015 20:08
PHP-Fusion Google Chrome Theme Graphics Talk 5 03-22-2013 06:59
Google+ Sign-In General Chat 6 02-26-2013 13:14