From: gerv%gerv.net <> Date: Mon, 3 Jan 2005 07:18:04 +0000 (+0000) Subject: Bug 274640: silently fix up custom sort order cookies which erroneously include SQL... X-Git-Tag: bugzilla-2.19.2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a90c06d0075eb8a0a9b57a8b80ba3c26f6136643;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 bdda404a31..79504d6351 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -612,6 +612,11 @@ my @selectnames = map($columns->{$_}->{'name'}, @selectcolumns); if (!$order || $order =~ /^reuse/i) { if ($cgi->cookie('LASTORDER')) { $order = $cgi->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 {