From: lpsolit%gmail.com <> Date: Wed, 28 Feb 2007 22:00:52 +0000 (+0000) Subject: Bug 234226: "Find a specific bug" shouldn't allow empty search - Patch by FrédÃ... X-Git-Tag: bugzilla-3.0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b550135e639e9acd7e55e5d7114fb6e687df3c4f;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 122a917de2..a22a748424 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". - - + +