]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 182375: Do not permit flags with spaces or commas; patch by Frédéric...
authorjocuri%softhome.net <>
Thu, 9 Dec 2004 17:16:08 +0000 (17:16 +0000)
committerjocuri%softhome.net <>
Thu, 9 Dec 2004 17:16:08 +0000 (17:16 +0000)
editflagtypes.cgi
template/en/default/global/user-error.html.tmpl

index a14f756805559a2dab7677433468d5aca210fc20..359078c102281f398edae8f0420c3c8bdc6be9ef 100755 (executable)
@@ -428,6 +428,7 @@ sub validateID {
 
 sub validateName {
     $::FORM{'name'}
+      && $::FORM{'name'} !~ /[ ,]/
       && length($::FORM{'name'}) <= 50
       || ThrowUserError("flag_type_name_invalid", { name => $::FORM{'name'} });
 }
index 102ab67acf76366d3f3fb3e6e5a527ae2c453ef1..81a96885d2b813c5adfeb7d339d336694a25c079 100644 (file)
 
   [% ELSIF error == "flag_type_name_invalid" %]
     [% title = "Flag Type Name Invalid" %]
-    The name <em>[% name FILTER html %]</em> must be 1-50 characters long.
+    The name <em>[% name FILTER html %]</em> must be 1-50 characters long
+    and must not contain any spaces or commas.
 
   [% ELSIF error == "format_not_found" %]
     [% title = "Format Not Found" %]