Page 1 of 1

Blacklist Email domain - possible?

Posted: Thu Oct 25, 2012 5:18 am
by HATEPOLICY
Hey,
We keep getting scum registering on our site and p2p'ing our stuff, we sell tunes,
We keep disabling them but they just re-register,
They ALL use @hush.com which is an anonymous warez/p2p domain,
Useless anyway as they pay with Paypal and we send out DMCA's to their real details.

But would be nice to just avoid all these c****.

Anyone?

Many thanks.

Re: Blacklist Email domain - possible?

Posted: Thu Oct 25, 2012 5:20 am
by pedro1993
Bare with me 5 minutes, I have a solution :)

Re: Blacklist Email domain - possible?

Posted: Thu Oct 25, 2012 5:25 am
by pedro1993
If it is just the hush.com domain you want to disable then you will need to edit the register.php file:

1. Go to catalog/controller/account/register.php
2. Find and replace this:

Code: Select all

if ((utf8_strlen($this->request->post['email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) {
with this:

Code: Select all

if ((utf8_strlen($this->request->post['email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email']) || strstr($this->request->post['email'], '@', true) == "hush.com") {
This method will mean that if someone type in name@hush.com in the registration page, then an email error will appear when they try submit.

Let me know how you get on :)

Be sure to back up the file first if you are uncomfortable with changing OpenCart files :)

Re: Blacklist Email domain - possible?

Posted: Thu Oct 25, 2012 5:42 am
by HATEPOLICY
wow, thx ever so much mate!!! :)

will get on it later on tonight and report back.

Thanks again!!!! :)

Re: Blacklist Email domain - possible?

Posted: Thu Oct 25, 2012 5:44 am
by pedro1993
No probs :)

Re: Blacklist Email domain - possible?

Posted: Thu Oct 25, 2012 6:41 am
by HATEPOLICY
pedro1993 wrote:
Let me know how you get on :)
Just tried and got this error:

Code: Select all

Warning: Wrong parameter count for strstr() in /home4/blabla/public_html/catalog/controller/account/register.php on line 359Warning: Cannot modify header information - headers already sent by (output started at /home4/blabla/public_html/index.php:104) in /home4/blabla/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home4/blabla/public_html/index.php:104) in /home4/blabla/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 29
Also the accounts I tried to create with @hush.com succeeded and I could login.
But nothing showed up on admin, strange, maybe I missed something anyway, its late, im tired ;)

Many thanks.

Re: Blacklist Email domain - possible?

Posted: Thu Oct 25, 2012 6:48 am
by pedro1993
Ooops, I forgot to mention, you must be on PHP 5.3 + to use the strstr like that. Your host should be able to upgrade you to 5.3 :)

Re: Blacklist Email domain - possible?

Posted: Thu Oct 25, 2012 6:56 am
by HATEPOLICY
Nice, hope for us still then!

Will report back and many thanks again!

Re: Blacklist Email domain - possible?

Posted: Sun Apr 21, 2013 7:03 pm
by HATEPOLICY
Hey,
I know this is rly late, finally upgraded to php 5.3, changed code as you kindly suggested but no joy,
No errors either, @hush.com can register still.

Any ideas?
Many thanks!

Re: Blacklist Email domain - possible?

Posted: Mon May 13, 2013 2:06 am
by pedro1993
Hi there,

I sent you a PM :)