chiark / gitweb /
Re-instate the blocklist of banned posters
authorMatthew Vernon <matthew@debian.org>
Sun, 16 Dec 2018 19:00:36 +0000 (19:00 +0000)
committerMatthew Vernon <matthew@debian.org>
Sun, 16 Dec 2018 19:00:36 +0000 (19:00 +0000)
This is largely a revert of f74ee06e256c2470ad5ed264b090486856258b7f
but doesn't add the "add poster to ban-list" button, per Todal request.

webstump/doc/help/filter-lists.html
webstump/scripts/filter.lib.pl
webstump/scripts/html_output.pl
webstump/scripts/webstump.lib.pl

index 6a1199cc7bf4276fd2badefa87dd413988137931..fe7fad74165650b2abeb989de14870a4a5beb8f1 100644 (file)
@@ -15,6 +15,9 @@ The algorithm for every incoming article is as follows:
 
 <OL>
 
 
 <OL>
 
+  <LI> Reject message if the author is listed in <A
+       HREF=##bad.posters.list>the List of Banned Posters.</A>.
+
   <LI> File message for human review if the author is listed in <A
        HREF=##watch.posters.list>the List of Untrusted Posters</A>.
 
   <LI> File message for human review if the author is listed in <A
        HREF=##watch.posters.list>the List of Untrusted Posters</A>.
 
index 891f7c926f7a17b4774db47f19c57b26f123342a..b82a55a52e836b46979827242141b983c6ca66e8 100644 (file)
@@ -92,6 +92,11 @@ sub review_incoming_message { # Newsgroup, From, Subject, RealSubject, Message,
   my $from = pop( @_ );
   my $newsgroup = pop( @_ );
 
   my $from = pop( @_ );
   my $newsgroup = pop( @_ );
 
+  if( &name_is_in_list( $from, "bad.posters.list" ) ) {
+    &process_approval_decision( $subject, $newsgroup, $dir, "reject blocklist", "", "auto bad poster" );
+    return;
+  }
+
   my $warning_file = &article_file_name( $dir ) . "/stump-warning.txt";
   my $match;
 
   my $warning_file = &article_file_name( $dir ) . "/stump-warning.txt";
   my $match;
 
index a974628f9d94ebe48b51e3d0bf66bdabf3217815..d9772d017091132e03bbec5865b99cc9d917df0c 100644 (file)
@@ -265,8 +265,8 @@ Add poster to watch list</INPUT>
 
 <BR><BR>
 <I>
 
 <BR><BR>
 <I>
-NOTE: Decisions to watchlist and whitelist posters can be reversed by 
-editing the respective lists of whitelisted and watchlisted posters.
+NOTE: Decisions to ban, watchlist and whitelist posters can be reversed by
+editing the respective lists of banlisted, whitelisted and watchlisted posters.
 ";
 
   &link_to_help( "filter-lists", "automatic filtering and filter lists, blacklisting and preapproved threads." );
 ";
 
   &link_to_help( "filter-lists", "automatic filtering and filter lists, blacklisting and preapproved threads." );
@@ -762,6 +762,7 @@ sub html_newsgroup_management {
 
     <OPTION VALUE=good.posters.list>Good Posters List
     <OPTION VALUE=watch.posters.list>Suspicious Posters List
 
     <OPTION VALUE=good.posters.list>Good Posters List
     <OPTION VALUE=watch.posters.list>Suspicious Posters List
+    <OPTION VALUE=bad.posters.list>Banned Posters List
     <OPTION VALUE=watch.words.list>Suspicious Words List
 
   </SELECT>
     <OPTION VALUE=watch.words.list>Suspicious Words List
 
   </SELECT>
index 45ff3d7dae41c4d56a95f5d67a570e23884411bb..379cf0602bbf87c61b2c393d2e5ac02195baa4d2 100644 (file)
@@ -398,6 +398,7 @@ sub check_config_list {
  &user_error( "invalid list name $list_to_edit" )
     if( $list_to_edit ne "good.posters.list"
         && $list_to_edit ne "watch.posters.list"
  &user_error( "invalid list name $list_to_edit" )
     if( $list_to_edit ne "good.posters.list"
         && $list_to_edit ne "watch.posters.list"
+        && $list_to_edit ne "bad.posters.list"
         && $list_to_edit ne "watch.words.list" );
 
   return &untaint( $list_to_edit );
         && $list_to_edit ne "watch.words.list" );
 
   return &untaint( $list_to_edit );