From 21440ad5da22a7e3324e316f3654c8a2e1c4ffeb Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Thu, 9 Dec 2004 17:15:11 +0000 Subject: [PATCH] =?utf8?q?Patch=20for=20bug=20182375:=20Do=20not=20permit?= =?utf8?q?=20flags=20with=20spaces=20or=20commas;=20patch=20by=20Fr=C3=A9d?= =?utf8?q?=C3=A9ric=20Buclin=20,=20r=3Dvladd,=20a=3D?= =?utf8?q?justdave.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- editflagtypes.cgi | 1 + template/en/default/global/user-error.html.tmpl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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" %] -- 2.47.2