]> 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:15:11 +0000 (17:15 +0000)
committerjocuri%softhome.net <>
Thu, 9 Dec 2004 17:15:11 +0000 (17:15 +0000)
editflagtypes.cgi
template/en/default/global/user-error.html.tmpl

index 8b51be3264688931b4e2351a5ad10c39e6e9cf39..a48dc757889ec3c4a528372fe10116d3e1837f5d 100755 (executable)
@@ -444,6 +444,7 @@ sub validateID {
 
 sub validateName {
     $::FORM{'name'}
+      && $::FORM{'name'} !~ /[ ,]/
       && length($::FORM{'name'}) <= 50
       || ThrowUserError("flag_type_name_invalid", { name => $::FORM{'name'} });
 }
index c92824ad3bc9b18fa33d3e34f577ea05f2a039da..79861b5f0a8ba9c2a221241d98104c9b010417c6 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 == "flag_update_denied" %]
     [% title = "Flag Modification Denied" %]