X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   reCAPTCHA for X-Cart Classic (https://forum.x-cart.com/showthread.php?t=74978)

Hallsons 08-12-2018 04:43 AM

Re: reCAPTCHA for X-Cart Classic
 
Wow, I just woke up to over 3,000 spam contact forms entered, and this is on my contact form and several ask a question forms. Any suggestions as to how to stop this?

PhilJ 08-12-2018 05:08 AM

Re: reCAPTCHA for X-Cart Classic
 
lol, they've got it in for you today. Clearly you missed an install step, or you're on a spam list.

Post an example email that you got via the contact form.

Hallsons 08-12-2018 05:19 AM

Re: reCAPTCHA for X-Cart Classic
 
I'll go back through the install again. There were 7 spam reviews from the same, 3 bogus users created, and like I mentioned, over 3,000 emails sent from the contact us form and multiple "ask a question about this product" forms from all throughout the catalog.

I've since permanently deleted them all so will have to wait for another to post LOL

Hallsons 08-12-2018 05:27 AM

Re: reCAPTCHA for X-Cart Classic
 
So all of these were from netsparker@example.com and searching for this on the web it is apparently a somewhat legit security scanner. Heck, someone might have actually initiated it intentionally to scan our website.

Again, I'll double check the installation...

PhilJ 08-26-2018 07:50 PM

Re: reCAPTCHA for X-Cart Classic
 
Did you solve it?

floracal 08-28-2018 07:39 AM

Re: reCAPTCHA for X-Cart Classic
 
Quote:

Originally Posted by Hallsons
So all of these were from netsparker@example.com and searching for this on the web it is apparently a somewhat legit security scanner. Heck, someone might have actually initiated it intentionally to scan our website.

Again, I'll double check the installation...



I just got hit today 8-28-2018 from netsparker@example.com

I have found that using FireFox (61.0.2 64-bit) recaptcha does not work.

elmirage001 08-28-2018 02:37 PM

Re: reCAPTCHA for X-Cart Classic
 
Quote:

Originally Posted by floracal
I just got hit today 8-28-2018 from netsparker@example.com

I have found that using FireFox (61.0.2 64-bit) recaptcha does not work.


I use FF and recaptcha is working in my version 61.0.2 (64-bit)

A_R 08-28-2018 05:09 PM

Re: reCAPTCHA for X-Cart Classic
 
Same here XC 4.7.9 Gold Plus - leads to a blank page - It's because this pages has already a number captcha from x-cart inserted. This may be causes the reCaptcha code not being inserted into the right place and propably would need replacing the existing coding.

A_R 09-02-2018 04:04 PM

Re: reCAPTCHA for X-Cart Classic
 
1 Attachment(s)
There is an error in the installation instruction:
IF YOU USE THE *ADVANCED* CUSTOMER REVIEWS MODULE...

17) In skin/common_files/modules/Advanced_Customer_Reviews/customer_add_review.tpl

BEFORE...

{include file="customer/buttons/submit.tpl" type="input" assign="submit_button"}

INSERT...

{* reCAPTCHA - www.xcartmods.co.uk *}
{if $active_modules.reCAPTCHA && $config.reCAPTCHA.reCAPTCHA_enabled eq "Y" && $config.reCAPTCHA.reCAPTCHA_site_key && $config.reCAPTCHA.reCAPTCHA_secret_key && $config.reCAPTCHA.reCAPTCHA_enabled_review eq "Y"
<tr>
<td colspan="2">&nbsp;</td>
<td>{include file="modules/reCAPTCHA/reCAPTCHA.tpl" align="left"}</td>
</tr>
{/if}
{* /reCAPTCHA *}


There is a } missing behind the eq "Yes" and the <tr> Tag!



If you run the Template sytntax this produce an error in the customer_add_review_t.tpl template
pointing at line 85 "<td colspan="2">&nbsp;</td>" - Unexpected "<"



Here is the corrected version:


{* reCAPTCHA - www.xcartmods.co.uk *}
{if $active_modules.reCAPTCHA && $config.reCAPTCHA.reCAPTCHA_enabled eq "Y" && $config.reCAPTCHA.reCAPTCHA_site_key && $config.reCAPTCHA.reCAPTCHA_secret_key && $config.reCAPTCHA.reCAPTCHA_enabled_review eq "Y"}
<tr>
<td colspan="2">&nbsp;</td>
<td>{include file="modules/reCAPTCHA/reCAPTCHA.tpl" align="left"}</td>
</tr>
{/if}
{* /reCAPTCHA *}


This will produce the right customer_add_review_t.tpl file version.


Attached zip file with 2 screenshots


PhilJ 09-03-2018 01:48 AM

Re: reCAPTCHA for X-Cart Classic
 
Zip file install.txt corrected with missing } (line 329).

nauticalstyle 09-12-2018 05:16 PM

Re: reCAPTCHA for X-Cart Classic
 
The 4.7.8 to 4.7.9 upgrade tries to patch a number of files with Google reCaptcha Module code, including include/login.php. Do I keep Phil's reCAPTCHA for X-Cart Classic code or do I have to undo all those mods?

cherie 09-13-2018 12:10 PM

Re: reCAPTCHA for X-Cart Classic
 
Quote:

Originally Posted by nauticalstyle
The 4.7.8 to 4.7.9 upgrade tries to patch a number of files with Google reCaptcha Module code, including include/login.php. Do I keep Phil's reCAPTCHA for X-Cart Classic code or do I have to undo all those mods?

Both codes can coexist so you should not need to change anything.

nauticalstyle 09-13-2018 09:00 PM

Re: reCAPTCHA for X-Cart Classic
 
Quote:

Originally Posted by cherie
Both codes can coexist so you should not need to change anything.





I had to manually patch these four files:


include/login.php
include/templater/plugins/function.load_defer_code.php
modules/Froogle/froogle.php
skin/common_files/customer/main/send_to_friend.tpl


Unfortunately I just get a blank screen on my first attempt at loading the v4.7.9 site after all the patches were applied (I'm working on my PC in a localhost development environment running XAMPP). So I'm now trying to debug.


Once I get v4.7.9 running properly I will be installing Phil's reBoot template.

pablo 09-25-2018 01:43 AM

Re: reCAPTCHA for X-Cart Classic
 
Wondering if this line is necessary?

<noscript><meta http-equiv="refresh" content="0.0;url=home.php"></noscript>

In the reCAPTCHA_js.tpl file.

It's just that a site audit in SEMRush is saying that the meta refresh is an "issue".

Is it an issue?

(X-Cart 4.6.6)

cherie 09-25-2018 07:34 AM

Re: reCAPTCHA for X-Cart Classic
 
I'm guessing it's necessary and seems innocuous. Not sure what issue they are seeing with it. Maybe they don't realize it's in a noscript tag and think you are doing an incorrect redirect.

pablo 09-26-2018 12:27 AM

Re: reCAPTCHA for X-Cart Classic
 
Thanks for the reply.

SEMRush just flags it as an issue, saying that meta refresh is a bad way to do things as it slows the page down etc doing the redirect.

cherie 09-26-2018 11:03 AM

Re: reCAPTCHA for X-Cart Classic
 
You should be able to ignore that recommendation since this is just a failsafe for when the visitor is not using JavaScript.

pablo 09-26-2018 11:08 PM

Re: reCAPTCHA for X-Cart Classic
 
And obviously they can't really use X-Cart without javascript anyway, so it's not needed.

pablo 11-06-2018 09:01 AM

Re: reCAPTCHA for X-Cart Classic
 
Hi
I'm getting a lot of spam through the unprotected "Ask a question about this product form" - which will probably surprise you all as much as it did me.

I'm attempting to extend this module to cover this form too, and have got it working up to a point.

The point being that if Recaptcha isn't filled, I just get a loading page.

I believe the problem will be the code I've added to popup_ask.php

The last line - what should this be please?

if ($bad_captcha) {
$top_message['content'] = func_get_langvar_by_name('lbl_reCAPTCHA_error');
$top_message['type'] = 'E';
func_header_location('popup_ask.php?productid=' . $productid);
}

cherie 11-07-2018 08:12 AM

Re: reCAPTCHA for X-Cart Classic
 
Quote:

Originally Posted by pablo
I'm getting a lot of spam through the unprotected "Ask a question about this product form"

An option is to enable Image Verification for only this form since some improvements have been made to this module in 4.7.10.

pablo 11-07-2018 08:21 AM

Re: reCAPTCHA for X-Cart Classic
 
Yeah, it's only a 4.7.6 shop though I'm afraid.
It works other than the error checking!

cherie 11-07-2018 10:49 AM

Re: reCAPTCHA for X-Cart Classic
 
Quote:

Originally Posted by pablo
Yeah, it's only a 4.7.6 shop though I'm afraid.

Hopefully we aren't going too far off topic, but it would be better to do the minor upgrade to the latest version for many reasons than try to modify this version. If it doesn't help with spam you've still done an important update.

PhilJ 01-28-2019 09:31 AM

Re: reCAPTCHA for X-Cart Classic
 
28th Jan 2019 - Update, login popup improved, added to 'ask a question about this product' popup, tested with v4.7.10.

PhilJ 02-28-2019 09:13 AM

Re: reCAPTCHA for X-Cart Classic
 
28th Feb 2019 - Only modules/reCAPTCHA/recaptchalib.php updated to prevent PHP warning from occurring.

A_R 03-01-2019 12:23 PM

Re: reCAPTCHA for X-Cart Classic
 
On your website there is no update to



28th Feb 2019 - Only modules/reCAPTCHA/recaptchalib.php updated to prevent PHP error from occurring.


available to download.

The only download is for 28th Jan 2019.
Cleared my browser and downloaded directly from your website.

Regrads


PhilJ 03-03-2019 04:15 AM

Re: reCAPTCHA for X-Cart Classic
 
It's updated now, see direct link to zip file in first post also.

PhilJ 03-29-2019 11:39 AM

Re: reCAPTCHA for X-Cart Classic
 
recaptchalib.php updated again, see first post for new zip. Thanks to Paul.

A_R 04-05-2019 01:27 PM

Re: reCAPTCHA for X-Cart Classic
 
1 Attachment(s)
As for the setting: 'Enabled on register form'
you only adress the Modifications for

15) In skin/common_files/customer/main/register.tpl
(for URL xcart/register.php)

However, for the Affiliate registration page under

skin/common_files/partner/main/register.tpl
(URL xcart/partner/register.php)

there is no modification provided.



Within the Image Verification Module - BOTH are being used.

So, to make the replacement from Image Verification to use reCAPTCHA
I would (and everybody who has activated the Affiliate module) need instructions to change this template too.

Please find the original file (partner/register.php) attached.

Your install instruction doesn't mention anything about this.
Please advise.

Great Module :cool:

PhilJ 04-10-2019 11:39 AM

Re: reCAPTCHA for X-Cart Classic
 
10th Apr 2019 - Option to add to Provider and Affiliate registration forms, CSS updated to downsize the reCAPTCHA box on mobiles, new loading spinners, langs.txt file added

A_R 04-10-2019 09:57 PM

Re: reCAPTCHA for X-Cart Classic
 
Hi Phil,

Installed
U&R
Works perfect


Thanks for your great work by adding Affiliate registration form.
Your customer service and turnaround time is outstanding :)


voodoo1967 04-24-2019 06:24 AM

Re: reCAPTCHA for X-Cart Classic
 
1 Attachment(s)
Getting 5 or so bogus registrations per day. Recaptcha working on Contactus form but on Registration Form I just get the spinning wheel icon - see attached image.

Re uploaded the latest version , cleared the cache and made the necessary change ie

6) In /include/register.php

BEFORE...

// Check address book
if (isset($address_book)) {

INSERT...

// reCAPTCHA - www.xcartmods.co.uk
if ($current_area == "C" && $main != "checkout" && $config['reCAPTCHA']['reCAPTCHA_enabled'] == "Y" && $config['reCAPTCHA']['reCAPTCHA_site_key'] && $config['reCAPTCHA']['reCAPTCHA_secret_key'] && $config['reCAPTCHA']['reCAPTCHA_enabled_register'] == "Y") {
include $xcart_dir . '/modules/reCAPTCHA/recaptcha_check_register.php';
}
// /reCAPTCHA


Anything else ?

PhilJ 04-25-2019 04:06 PM

Re: reCAPTCHA for X-Cart Classic
 
@ voodoo, probably worth going thru the latest install one more time. Looks like the reCAPTCHA javascript is not getting loaded, so check step 5.

The CSS is fine, else there'd be no spinner.

If you still have problems, drop me a line and I'll take a look.

voodoo1967 04-26-2019 04:04 AM

Re: reCAPTCHA for X-Cart Classic
 
Re did step 5 - worked a treat - thanks Phil
Lets hope bots "bot off" and leave me alone now

PhilJ 04-26-2019 04:16 AM

Re: reCAPTCHA for X-Cart Classic
 
Glad you sorted it :)

costanza 04-29-2019 11:36 PM

Re: reCAPTCHA for X-Cart Classic
 
I just installed this mod (thanks Phil !!), but I can't get it to work. I have a 4.6.1 site with Reboot and I can't get the reCAPTCHA to appear.

The reCAPTCHA does not appear and my 'contact us' page seems hung up. If it helps, my recently viewed product mini thumbnail pics are hung up and don't load on my 'contact us' page. (the reCAPTCHA doesn't show up anywhere it should, "send to friend", "ask a question about a product" or the contact us.

Any clues to help would be greatly appreciated!!

Update ** I noticed trying to login on the customer side (with correct password) was getting an error !check that you're not a robot, but there was no box visible to check. I turned off the reCAPTCHA mod for now and can log in again.

PhilJ 04-30-2019 12:10 AM

Re: reCAPTCHA for X-Cart Classic
 
@ constanza, ensure you are modifying the correct .tpl files.
You'll be modifying the /skin/reboot/ files as opposed to /skin/common_files/

costanza 06-06-2019 04:00 PM

Re: reCAPTCHA for X-Cart Classic
 
This module works great, but I just realized it doesn't work on X-cart mobile. What files need to be updated to get x-cart mobile to work?

Really I just need it on my Contact US page and to work with 'Ask a Question about this product'.

PhilJ 12-04-2019 05:02 AM

Re: reCAPTCHA for X-Cart Classic
 
9th Dec 2019 - Additional simple honeypots for the customer registration and contact us forms

Some rogue register and contact us forms have been getting through, so this ought to stop them.

PhilJ 12-09-2019 02:30 PM

Re: reCAPTCHA for X-Cart Classic
 
Honeypot added for the customer register form...

PhilJ 12-19-2019 05:59 PM

Re: reCAPTCHA for X-Cart Classic
 
v4.5.5 users, try applying the v4.6.x patch.

I don't have time to test for v4.5.5 users, but if it doesn't work, reply here and I'll find you a solution, ta.


All times are GMT -8. The time now is 05:29 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.