]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Wasn't properly stripping out null queries on text searches.
authorterry%netscape.com <>
Wed, 20 Jan 1999 01:17:21 +0000 (01:17 +0000)
committerterry%netscape.com <>
Wed, 20 Jan 1999 01:17:21 +0000 (01:17 +0000)
Harmless, but was generating overly complicated SQL.

buglist.cgi

index 4a59cbbe868428ad575b53e4797da20f5c899446..bc4fbc5cb7619e87ed0a05214aa450dd5096849b 100755 (executable)
@@ -328,12 +328,13 @@ Click the <B>Back</B> button and try again.";
 
 foreach my $f ("short_desc", "long_desc", "bug_file_loc") {
     if (defined $::FORM{$f}) {
-        my $s = SqlQuote(trim($::FORM{$f}));
+        my $s = trim($::FORM{$f});
         if ($s ne "") {
+            $s = SqlQuote($s);
             if ($::FORM{$f . "_type"} eq "regexp") {
-                $query .= "and $f regexp $s ";
+                $query .= "and $f regexp $s\n";
             } else {
-                $query .= "and instr($f, $s) ";
+                $query .= "and instr($f, $s)\n";
             }
         }
     }