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 ++++++ 1 file changed, 6 insertions(+) (limited to 'buglist.cgi') 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 ################################################################################ -- cgit v1.2.3-24-g4f1b