From: gerv%gerv.net <> Date: Mon, 3 Jan 2005 07:21:22 +0000 (+0000) Subject: Bug 274640: silently fix up custom sort order cookies which erroneously include SQL... X-Git-Tag: bugzilla-2.18~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6f3a914cc8368cc53c8e59c6e38644bdd33dc7e;p=thirdparty%2Fbugzilla.git Bug 274640: silently fix up custom sort order cookies which erroneously include SQL LIMIT clause. Patch by gerv; r=vladd,justdave; a=justdave. --- diff --git a/buglist.cgi b/buglist.cgi index 1ae44467fc..cc1aa81436 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -606,6 +606,11 @@ my @selectnames = map($columns->{$_}->{'name'}, @selectcolumns); if (!$order || $order =~ /^reuse/i) { if ($::COOKIE{'LASTORDER'}) { $order = $::COOKIE{'LASTORDER'}; + + # Cookies from early versions of Specific Search included this text, + # which is now invalid. + $order =~ s/ LIMIT 200//; + $order_from_cookie = 1; } else {