From b550135e639e9acd7e55e5d7114fb6e687df3c4f Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 28 Feb 2007 22:00:52 +0000 Subject: [PATCH] =?utf8?q?Bug=20234226:=20"Find=20a=20specific=20bug"=20sh?= =?utf8?q?ouldn't=20allow=20empty=20search=20-=20Patch=20by=20Fr=C3=83?= =?utf8?q?=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r/a=3Dju?= =?utf8?q?stdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- buglist.cgi | 6 ++++++ template/en/default/search/search-specific.html.tmpl | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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". - - + + -- 2.47.2