From: jocuri%softhome.net <> Date: Thu, 9 Dec 2004 17:15:11 +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.19.2~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21440ad5da22a7e3324e316f3654c8a2e1c4ffeb;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 8b51be3264..a48dc75788 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -444,6 +444,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 c92824ad3b..79861b5f0a 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -342,7 +342,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 == "flag_update_denied" %] [% title = "Flag Modification Denied" %]