]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 282790: Warn if name for a stored query exceeds maximum length
authorbugreport%peshkin.net <>
Mon, 21 Feb 2005 01:15:13 +0000 (01:15 +0000)
committerbugreport%peshkin.net <>
Mon, 21 Feb 2005 01:15:13 +0000 (01:15 +0000)
patch by LpSolit
r=mkanat,a=justdave

buglist.cgi
template/en/default/global/user-error.html.tmpl

index 4b9bc960f163e27b819d609a551a7ecf6eb02ace..fd01f10d5fa7c5efb0a432b8a7fbc55fe818cee1 100755 (executable)
@@ -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);
index ac2cba6d3c9280b1cdd92e5d8317383ac26b979b..55c7969242ed8255aaecb6b5563ce0c1b3756b7d 100644 (file)
     [% 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.