]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Let's outlaw whitespace in keywords.
authorterry%mozilla.org <>
Thu, 20 Jan 2000 03:24:27 +0000 (03:24 +0000)
committerterry%mozilla.org <>
Thu, 20 Jan 2000 03:24:27 +0000 (03:24 +0000)
editkeywords.cgi
sanitycheck.cgi

index 72fe78bf07e580049e27a7b521c994c54ff4c4c4..3443a5c3f7173196a648c581686d15e79ea99f61 100755 (executable)
@@ -88,8 +88,8 @@ sub Validate ($$) {
         PutTrailer($localtrailer);
         exit;
     }
-    if ($name =~ /,/) {
-        print "You may not use commas in a keyword name.\n";
+    if ($name =~ /[\s,]/) {
+        print "You may not use commas or whitespace in a keyword name.\n";
         print "Please press <b>Back</b> and try again.\n";
         PutTrailer($localtrailer);
         exit;
index 33890be787338d93dce5fca190c7622318875045..08fbbfb8f2155ccef43dffb4991dab39e290a607 100755 (executable)
@@ -234,7 +234,7 @@ while (@row = FetchSQLData()) {
         Alert("Duplicate entry in keyworddefs for id $id");
     }
     $keywordids{$id} = 1;
-    if ($name =~ /,/ || $name =~ /^\s/ || $name =~ /\s$/) {
+    if ($name =~ /[\s,]/) {
         Alert("Bogus name in keyworddefs for id $id");
     }
 }