git: 9295c9b3af - main - update list of valid active mailing list prefixes

Wolfram Schneider <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by wosch:

URL: https://cgit.FreeBSD.org/doc/commit/?id=9295c9b3af2d8d4916461e11f6a27ec50736e7f6

commit 9295c9b3af2d8d4916461e11f6a27ec50736e7f6
Author:     Wolfram Schneider <[email protected]>
AuthorDate: 2023-01-24 17:06:22 +0000
Commit:     Wolfram Schneider <[email protected]>
CommitDate: 2023-01-24 17:06:22 +0000

    update list of valid active mailing list prefixes
---
 website/content/en/cgi/getmsg.cgi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/website/content/en/cgi/getmsg.cgi b/website/content/en/cgi/getmsg.cgi
index ba486e4c99..823f88d87b 100755
--- a/website/content/en/cgi/getmsg.cgi
+++ b/website/content/en/cgi/getmsg.cgi
@@ -51,6 +51,8 @@ sub Fetch
     $file =~ s|/+|/|;
     $file =~ s|^archive/|$messagepath/|;
 
+    my $valid_list_name = '^current/(ctm|cvs|dev|freebsd|netperf|p4|soc|svn|trustedbsd|vendors)(-[a-z0-9-]+)?$';
+
     # read the full archive 
     if ($type eq 'archive') {
 	# from the FreeBSD ftp server
@@ -61,7 +63,7 @@ sub Fetch
 	}
 	
 	# from the local mail archive for current mails
-	elsif ($file =~ m%^current/(cvs|svn|freebsd|p4|trustedbsd)-[a-z0-9-]+$% &&
+	elsif ($file =~ /$valid_list_name/ &&
 	       open(DATA, "$messagepathcurrent$file")) {
 	    print "Content-type: text/plain\n\n"; 
 	    while(<DATA>) {
@@ -73,7 +75,7 @@ sub Fetch
     }
 
     if (($file =~ /^$messagepath/ && -f $file && open(DATA, $file)) ||
-	($file =~ m%^current/(cvs|svn|freebsd|p4|trustedbsd)-[a-z0-9-]+$% &&
+	($file =~ /$valid_list_name/ &&
 	 open(DATA, "$messagepathcurrent$file")))
     {
 	@finfo = stat DATA;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.