Post by thomas.huerlimann » Tue Dec 24, 2019 5:48 am

Hi all

We have enabled Google reCAPTCHA on OpenCart 3.0.3.2 and we have it properly configured. It is visible on the registration form here.

The problem is, the Captcha is ignored. The registration is possible regardless if the captcha was solved or not.

Can someone else reproduce it, and if yes, is this a simple bug? If yes, would this be solved soon?

Best regards
Tom


Posts

Joined
Mon May 13, 2019 10:44 pm

Post by IP_CAM » Tue Dec 24, 2019 6:37 am

Die Registrierung (bitte wieder löschen) konnte erst nach Anklicken des Feldes abgeschlossen werden.
Woher aber der doppelte Bestätigunseintrag in der -breadcrumb- Sektion stammt, ist mir auch nicht klar ...
Ernst
PS: Und in diesem Forum Teil sollten wirklich nur OC Bugs erwähnt werden, nicht individuelle Fehler. ;)
Sonst macht man hier gern die Hunde scharf ...
---
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by cedcommerceteam » Tue Dec 24, 2019 10:00 pm

Hi,

I have checked site link provided in forum,

I have found some issue on server side validation of form,

the value of field "g-recaptcha-response" is blank but still form get submitted and account created

you can add below code for validation in controller

if (isset($this->request->post['g-recaptcha-response']) && $this->request->post['g-recaptcha-response']) {

$recaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode('Recaptcha Private Key') . '&response=' . $this->request->post['g-recaptcha-response'] . '&remoteip=' . $this->request->server['REMOTE_ADDR']);

$recaptcha = json_decode($recaptcha, true);

if (isset($recaptcha['success']) && !$recaptcha['success']) {
$this->error['warning'] = 'Error Message';
}
} else {
$this->error['warning'] = 'Error Message';
}

Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm

Post by tom327 » Fri Jul 30, 2021 7:20 am

I was having this same problem with Opencart 3.0.3.2 and using PHP 7.4

For customer registration form the recaptcha is ignored. Recaptcha can be unchecked and you can still submit form.

In my Settings > Option > Captcha -- I have Register Checked. I also have some other forms on my site from a third party extension,and they use same recaptcha and work fine.

Did the provided code here solve the problem?

I was not clear about what file needed to be modified, and where in the file you would add this code? Any help would be appreciated

Active Member

Posts

Joined
Thu Feb 16, 2012 7:33 am

Post by ADD Creative » Fri Jul 30, 2021 7:57 am

There is an issue where it only has to be passed once per session. Try. viewtopic.php?f=201&t=207560#p823420

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 40 guests