From: jocuri%softhome.net <> Date: Thu, 9 Dec 2004 17:16:08 +0000 (+0000) Subject: Patch for bug 182375: Do not permit flags with spaces or commas; patch by Frédéric... X-Git-Tag: bugzilla-2.18~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=185da0f795869902ba52f9e1637f506f58868f13;p=thirdparty%2Fbugzilla.git Patch for bug 182375: Do not permit flags with spaces or commas; patch by Frédéric Buclin , r=vladd, a=justdave. --- diff --git a/editflagtypes.cgi b/editflagtypes.cgi index a14f756805..359078c102 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -428,6 +428,7 @@ sub validateID { sub validateName { $::FORM{'name'} + && $::FORM{'name'} !~ /[ ,]/ && length($::FORM{'name'}) <= 50 || ThrowUserError("flag_type_name_invalid", { name => $::FORM{'name'} }); } diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 102ab67acf..81a96885d2 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -224,7 +224,8 @@ [% ELSIF error == "flag_type_name_invalid" %] [% title = "Flag Type Name Invalid" %] - The name [% name FILTER html %] must be 1-50 characters long. + The name [% name FILTER html %] must be 1-50 characters long + and must not contain any spaces or commas. [% ELSIF error == "format_not_found" %] [% title = "Format Not Found" %]