Whitelist for spam blacklist
Closed, ResolvedPublic

Assigned To
None
Priority
Normal
Author
bzimport
Blocks
T6462: Spam blacklist (tracking)
Commits
Unknown Object (Commit)
Subscribers
wikibugs-l
Projects
Reference
bz1733
Description

Author: silsor

Description:
This has been planned for a while but there was no bug for it.

See whitelist-related material on http://meta.wikimedia.org/wiki/Spam_blacklist


Version: unspecified
Severity: normal
URL: http://meta.wikimedia.org/wiki/Spam_blacklist

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz1733.
bzimport created this task.Via LegacyMar 22 2005, 11:00 PM
brion added a comment.Via ConduitMar 23 2005, 12:17 AM

Can't this already be done with the regular expressions?

bzimport added a comment.Via ConduitApr 6 2005, 10:50 PM

silsor wrote:

Not as far as I know.

bzimport added a comment.Via ConduitMay 4 2006, 7:15 PM

verdy_p wrote:

Couldn't the huge spam list be broken per domain, for much faster finding?

As far as I know, the valid TLDs are strictly limited and wellknown (their list is publised by ICANN). So
invalid TLDs (including commercial pseudo-TLDs that have not been approved by ICANN and use specific DNS
systems or that require a client-side DNS client patch like NewNet which is most often stealing privacy,
i.e. spyware) can be eliminated immediately. Keep just the ICANN list.

Then break the spam list per valid TLD, as it will also ease its management, as the list becomes huge...
Each TLD list should also come into two parts: one using simple string equality (scanned first, it is
sorted alphabetically for fast finding), and a final section using regexps (regexps require too much memory
resource on the server).

For efficient finding, it should be useful to reverse the order of domain name parts in the domain name:
www.xyz.com becomes com.xyz.www, which is then splitted into physical file folders (or virtual ones on
memory using arrays) if there are multiple exclusions:

com/
  xyz/
    www

For example:

blacklist = array(0, //block all other non-ICANN TLDs

com=>array(1, //pass all .com by default
  xyz=>array(1, //pass "xyz.com" except the following subdomains:
    www=>0, //block this host and subdomains
    //the other hosts in ".xyz.com" pass as set in the parent rule
    ),
  spamsite=>0,//block this domain and all subdomains
  // other simple xxx.com block rules come here...
  "*" => array(1, //using regexps, pass by default
    "[a-z][0-9]{5,}"=>0 // block <numeric>.com with 5 digits or more
    ),
  ),
net=>array(1, //pass all .net by default
  //block rules for .net come here
  ),
org=>array(1, //pass all .org by default
  //block rules for .org come here
  ),
de=>array(1, //pass all .de by default
  //block rules for .de come here
  ),
fr=>array(1, //pass all .fr by default
  //block rules for .de come here
  ),
//other accepted TLDs come here...

);
Then domain name can be performed by simple table lookup, using one domain name part at a time:

  • if the value is an integer, then it gives the blocking rule for the current domain and all its subdomains
  • if the value is an array, then the first entry at index 0 gives the blocking rule (0=pass or 1=block),

and the other entries contain other domain name parts to scan for exceptions.

  • if there's no entry for the scanned domain namepart in the array, then look if there's a "*" entry. If

so, uses regexps matching for scanning its list from first to last and get their blocking rule.

This will reduce a lot the use of regexps. The array above can be easily built by reading and parsing once
a text file where these rules are summarized and maintained.

brion added a comment.Via ConduitJun 22 2006, 8:11 PM

I've implemented a whitelist in r14912. It's editable by
local admins at MediaWiki:Spam-whitelist, and is in the same
format as the blacklist page.

epriestley added a commit: Unknown Object (Commit).Via DaemonsMar 4 2015, 8:14 AM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.