Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
78cbd8ba
Commit
78cbd8ba
authored
Jun 08, 2002
by
bbaetz%student.usyd.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 149845 - buglist.cgi checks for ORDER validity are wrong
r=myk x2
parent
58a015c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
buglist.cgi
buglist.cgi
+6
-4
No files found.
buglist.cgi
View file @
78cbd8ba
...
...
@@ -1302,11 +1302,13 @@ if ($order) {
# by which to sort the results.
ORDER:
for
(
$order
)
{
/\./
&&
do
{
my
@columnnames
=
map
(
$columns
->
{
lc
(
$_
)}
->
{
'name'
},
keys
(
%
$columns
));
# A custom list of columns. Make sure each column is valid.
foreach
my
$fragment
(
split
(
/[,\s]+/
,
$order
))
{
next
if
$fragment
=~
/^asc|desc$/i
;
my
@columnnames
=
map
(
$columns
->
{
lc
(
$_
)}
->
{
'name'
},
keys
(
%
$columns
));
if
(
!
grep
(
$_
eq
$fragment
,
@columnnames
))
{
foreach
my
$fragment
(
split
(
/,/
,
$order
))
{
$fragment
=
trim
(
$fragment
);
# Accept an order fragment matching a column name, with
# asc|desc optionally following (to specify the direction)
if
(
!
grep
(
$fragment
=~
/^\Q$_\E(\s+(asc|desc))?$/
,
@columnnames
))
{
my
$qfragment
=
html_quote
(
$fragment
);
my
$error
=
"The custom sort order you specified in your "
.
"form submission contains an invalid column "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment