[Fusionforge-commits] r11014 - trunk/src/deb-specific

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Oct 15 17:28:07 CEST 2010


Author: lolando
Date: 2010-10-15 17:28:06 +0200 (Fri, 15 Oct 2010)
New Revision: 11014

Modified:
   trunk/src/deb-specific/create-mailing-lists.pl
Log:
Add validation for mailing-list names to the Perl implementation

Modified: trunk/src/deb-specific/create-mailing-lists.pl
===================================================================
--- trunk/src/deb-specific/create-mailing-lists.pl	2010-10-15 14:48:51 UTC (rev 11013)
+++ trunk/src/deb-specific/create-mailing-lists.pl	2010-10-15 15:28:06 UTC (rev 11014)
@@ -47,6 +47,11 @@
 	my ($group_list_id, $listname, $user_name, $password, $description, $is_public) ;
 	my ($tmp) ;
 
+	next if $listname eq '' ;
+	next if $listname eq '.' ;
+	next if $listname eq '..' ;
+	next if $listname !~ /^[a-z0-9\-_\.]*$/ ;
+
 	($group_list_id, $listname, $user_name, $password, $description, $is_public)= @array ;
 	my $cmd = "/usr/sbin/newlist -q $listname $user_name\@$sys_users_host $password >/dev/null 2>&1" ;
 	#print "cmd = <$cmd>\n" ;
@@ -120,6 +125,11 @@
 	my ($group_list_id, $listname, $user_name, $password, $description, $is_public) ;
 	my ($tmp) ;
 
+	next if $listname eq '' ;
+	next if $listname eq '.' ;
+	next if $listname eq '..' ;
+	next if $listname !~ /^[a-z0-9\-_\.]*$/ ;
+
 	($group_list_id, $listname, $user_name, $password, $description, $is_public)= @array ;
 	my $cmd = "/usr/lib/mailman/bin/change_pw -l $listname >/dev/null 2>&1" ;
 	system ($cmd) ;




More information about the Fusionforge-commits mailing list