From: lpsolit%gmail.com <> Date: Wed, 28 Feb 2007 21:58:22 +0000 (+0000) Subject: Bug 234226: "Find a specific bug" shouldn't allow empty search - Patch by FrédÃ... X-Git-Tag: bugzilla-3.1.2~325 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4bb080df93feb9751079a931f10b25cd8f66961;p=thirdparty%2Fbugzilla.git Bug 234226: "Find a specific bug" shouldn't allow empty search - Patch by Frédéric Buclin r/a=justdave --- diff --git a/buglist.cgi b/buglist.cgi index 948916d0fb..96011d3f70 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -74,6 +74,12 @@ if (defined($searchstring)) { # as if this had been a normal query from the beginning. } +# Reject empty searches from the simple search form, including +# words being a single or several consecutive whitespaces only. +if (defined($cgi->param('content')) && $cgi->param('content') =~ /^\s*$/) { + ThrowUserError("buglist_parameters_required"); +} + ################################################################################ # Data and Security Validation ################################################################################ diff --git a/template/en/default/search/search-specific.html.tmpl b/template/en/default/search/search-specific.html.tmpl index 2d7eb945d8..d93abd883b 100644 --- a/template/en/default/search/search-specific.html.tmpl +++ b/template/en/default/search/search-specific.html.tmpl @@ -109,8 +109,12 @@ for "crash secure SSL flash". - - + +