From e4bb080df93feb9751079a931f10b25cd8f66961 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 28 Feb 2007 21:58:22 +0000 Subject: Bug 234226: "Find a specific bug" shouldn't allow empty search - Patch by Frédéric Buclin r/a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 948916d0f..96011d3f7 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 2d7eb945d..d93abd883 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". - - + + -- cgit v1.2.3-24-g4f1b