From: bugreport%peshkin.net <> Date: Mon, 21 Feb 2005 01:15:13 +0000 (+0000) Subject: Bug 282790: Warn if name for a stored query exceeds maximum length X-Git-Tag: bugzilla-2.19.3~268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6ddaf9809207f52a5f2ccefbb323eb92c887c8a;p=thirdparty%2Fbugzilla.git Bug 282790: Warn if name for a stored query exceeds maximum length patch by LpSolit r=mkanat,a=justdave --- diff --git a/buglist.cgi b/buglist.cgi index 4b9bc960f1..fd01f10d5f 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -239,6 +239,7 @@ sub InsertNamedQuery ($$$;$) { # Validate the query name. $query_name || ThrowUserError("query_name_missing"); $query_name !~ /[<>&]/ || ThrowUserError("illegal_query_name"); + (length($query_name) <= 64) || ThrowUserError("query_name_too_long"); trick_taint($query_name); detaint_natural($userid); diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index ac2cba6d3c..55c7969242 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -862,6 +862,10 @@ [% title = "No Search Name Specified" %] You must enter a name for your search. + [% ELSIF error == "query_name_too_long" %] + [% title = "Query Name Too Long" %] + The name of the query must be less than 64 characters long. + [% ELSIF error == "quips_disabled" %] [% title = "Quips Disabled" %] Quips are disabled.