Post by wolfdogpete » Fri Feb 17, 2023 6:43 am

I get a lot of spam registration which I'm trying to sort out.

I added the following lines of code to catalog -> controller -> account -> register.php because most of the spam telephone number start with 8
if ((utf8_substr($this->request->post['telephone'],0,1) == '8')) {
$this->error['telephone'] = $this->language->get('error_telephone');
}
I put the line just after this one.
if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) {
$this->error['telephone'] = $this->language->get('error_telephone');
}

But it appears to be ignoring the new line.
I've also tried != '0' in place of =='8' but still doesn't stop it.

Can anyone tell me what I am doing wrong please?

Regards
Pete

Newbie

Posts

Joined
Sat Feb 01, 2014 2:06 am

Post by by mona » Fri Feb 17, 2023 6:52 am

Not really sure why you think what you are doing will help, but you could just use || or
Have you refreshed cache ?

Are you using captcha?

search the marketplace
https://www.opencart.com/index.php?rout ... ch=captcha
https://www.opencart.com/index.php?rout ... earch=spam
spam buster
invisible captacha

https://www.google.com/search?q=opencar ... ncart+spam

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by wolfdogpete » Fri Feb 17, 2023 7:03 am

Hi Mona,
I thought it would help by creating a "Telephone number" error and not let the registration go through.
I don't know how spam things work so I may be totally wrong.

Thanks for the links. I had searched the extensions but obviously looking for the wrong thing as I couldn't find any.

Regards
Pete

Newbie

Posts

Joined
Sat Feb 01, 2014 2:06 am

Post by wolfdogpete » Fri Feb 17, 2023 7:04 am

and "yes" I do use google captcha V3.

Newbie

Posts

Joined
Sat Feb 01, 2014 2:06 am

Post by by mona » Fri Feb 17, 2023 10:12 am

sent you message - I get it
substr not utf8_strlen

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by JNeuhoff » Fri Feb 17, 2023 7:03 pm

@wolfdogpete: Spambots are not human users, they are automated scripts trying to do fake account registrations. And from our experience they use amongst others all sorts of different phone number values. I recommend our SpamBot Buster extension which is able to prevent fake account registrations and spam messages quite effectively. Also, no captcha is required.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by wolfdogpete » Fri Feb 17, 2023 8:55 pm

Hi JNeuhoff
I installed your spambot buster last night and this is the first morning fot quite a while that I haven't got up to over 100 spam registrations.
I actually woke up to NONE.

Exellent plugin so far. Good work and thank you.

Newbie

Posts

Joined
Sat Feb 01, 2014 2:06 am

User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JNeuhoff » Fri Feb 17, 2023 9:28 pm

wolfdogpete wrote:
Fri Feb 17, 2023 8:55 pm
Hi JNeuhoff
I installed your spambot buster last night and this is the first morning fot quite a while that I haven't got up to over 100 spam registrations.
I actually woke up to NONE.

Exellent plugin so far. Good work and thank you.
Glad to hear it works.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Bob Grainger » Fri Apr 26, 2024 8:05 pm

Further to the author's post (WolfDogPete) of 16 Feb 2023, I made the changes to the register.php file that Pete (unsuccessfully) tried, and it worked perfectly for me. I have even turned off my Google reCaptcha now for a better user experience. Thanks Pete!

Newbie

Posts

Joined
Thu Nov 04, 2021 8:18 pm

Post by paulfeakins » Mon Apr 29, 2024 7:39 pm

wolfdogpete wrote:
Fri Feb 17, 2023 6:43 am
Can anyone tell me what I am doing wrong please?
Trying to do a quick hack that might break stuff when extensions exist that fix the issue properly:
https://www.opencart.com/index.php?rout ... er=antropy

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 20 guests