INN commit: trunk/control/modules (newgroup.pl)

INN Commit Russ_Allbery at isc.org
Sat Apr 4 10:54:53 UTC 2009


    Date: Saturday, April 4, 2009 @ 03:54:53
  Author: iulius
Revision: 8404

* Allow a repeated punctuation in the name of a newsgroup.

* Do not allow a newsgroup named "poster".

* Top-level "control", "example", "junk" and "to" are now rejected.

* Comment a redundant check.

Modified:
  trunk/control/modules/newgroup.pl

-------------+
 newgroup.pl |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Modified: newgroup.pl
===================================================================
--- newgroup.pl	2009-04-04 10:40:57 UTC (rev 8403)
+++ newgroup.pl	2009-04-04 10:54:53 UTC (rev 8404)
@@ -249,12 +249,14 @@
     # Whole-name checking.
     return 'Empty group name' if (! $_);
     return 'Whitespace in group name' if /\s/;
-    return 'Unsafe group name' if /[\`\/:;]/;
+#    return 'Unsafe group name' if /[\`\/:;]/;
     return 'Bad dots in group name' if /^\./ or /\.$/ or /\.\./;
 #    return 'Group name does not begin/end with alphanumeric'
 #        if (/^[a-zA-Z0-9].+[a-zA-Z0-9]$/;
-    return 'Group name begins in control., example., junk. or to.'
-        if /^(?:control|example|junk|to)\./;
+    return 'Group name begins in control., example. or to.'
+        if /^(?:control|example|to)\./;
+    return 'Group name is control, example, junk, poster or to'
+        if /^(?:control|example|junk|poster|to)$/;
 #    return 'Group name too long' if length $_ > 128;
 
     my @components = split(/\./);
@@ -272,7 +274,7 @@
         return 'Uppercase letter(s) in name' if /[A-Z]/;
         return 'Illegal character(s) in name' if /[^a-z0-9+_\-]/;
         # Sigh, c++ etc. must be allowed.
-        return 'Repeated punctuation in name' if /--|__|\+\+./;
+#        return 'Repeated punctuation in name' if /--|__|\+\+./;
 #        return 'Repeated component(s) in name' if ($i + 2 <= $#components
 #            and $_ eq $components[$i + 1] and $_ eq $components[$i + 2]);
     }




More information about the inn-committers mailing list