*

tbarto

  • *
  • 4 posts
I've been receiving several spam registrations from known spam emails, so I added ban rules for those email domains such as ... @warn.westrb.com and @hear.nymega.com and @rely.ovaki.com and a few more that have been registering with a variety of different usernames.  But even after adding the ban rules for those email domains, I am still getting spam registrations from those same domains.  I'm not including the entire email address ... just the @domain.com just like I listed the ones above.  Is there anything else I need to do to make the ban rules actually work? 

*

MB Themes

@tbarto
Incorrect: @domain.com
Correct:  *@domain.com

Make sure you are using that star as well, it is used as wild character
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

tbarto

  • *
  • 4 posts
Ok, thank you very much.  I will add the * to my ban rules.

*

MB Themes

@tbarto
Sure, let me know if that helped ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

statek

  • **
  • 8 posts
the same problem - registered rules like *.eu and *.fun don't work - spammers still able to register :(

*

MB Themes

I've run validation and if *.eu ban rule is created, it will ban whatever@domain.eu form of mails
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

I am trying to prevent bots from registering by using standard email blocking rules.
To this end, I set up the following rule for emails, among others: *@hotmail.com, *@yahoo.com
Nevertheless, registrations like ericsaunders24@yahoo.com still occur daily.
Yes, I am aware that the paid "Anti-Spam and Bot Protection" Osclass plugin handles this more effectively.
However, I assumed that the blocking rule mentioned above would work natively.
Am I overlooking something, or where should I start troubleshooting?

Last update check: 2026-08-05 16:00:05
Current front theme: Sigma Osclass Theme (sigma)
Current oc-admin theme: Omega Admin Theme (omega)
All plugins: 0 plugins

*

MB Themes

There must be something wrong as that rule should nicely block such user email and I was not able to reproduce issue.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Okay, thanks - where should I start looking to find the cause of the error? The system is a clean install, after all, without any plugins or customizations.
@Statek seemed to have this problem too.

*

MB Themes

there are functions like osc_is_banned_email, I would start checking output of these.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Thanks for the tip - I used Notepad++ to search my entire project for the pattern "osc_is_banned_email" across all files (*.*), ignoring case - but no results were found.
I also separately extracted the original zip file "osclass-v8.3.1.zip" (dated June 1, 2026) and ran the same search on it.
That pattern could not be found there either, across a total of 2,298 files.
Strange.

*

MB Themes

This is wrapper function for email/ip check in itemactions.
Code: [Select]
    $banned = osc_is_banned(trim(strip_tags((string)$aItem['authorEmail'])));
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Thank you very much, with this search pattern I now have one approach.

In /oc-includes/osclass/helpers/hSecurity.php, line 144, I found the following function, which strikes me as odd because the `$email` variable being checked gets overwritten - effectively becoming empty - meaning the actual email address from the registration cannot actually be checked against the ban rule patterns:

Code: [Select]
function osc_is_banned($email = '', $ip = null) {
if($ip == null) {
$ip = osc_get_ip();
}

//$rules = BanRule::newInstance()->listAll();

if(osc_is_ip_banned($ip)) {
return 2;
} else if(osc_is_email_banned($email)) {
return 1;
}

return 0;
}

*

MB Themes

Where? Dont see override
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots