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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
4b5278c7
Commit
4b5278c7
authored
Nov 08, 2001
by
myk%mozilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 108812: Prevent users from running queries containing arbitrary SQL.
Patch by Jake <jake@acutex.net> r=bbaetz,myk
parent
e2a35933
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
buglist.cgi
buglist.cgi
+8
-4
No files found.
buglist.cgi
View file @
4b5278c7
...
...
@@ -187,10 +187,14 @@ sub GenerateSQL {
push
(
@specialchart
,
[
"bug_id"
,
$type
,
join
(
','
,
@
{
$M
{
'bug_id'
}})]);
}
if
(
defined
$F
{
'sql'
})
{
die
"Invalid sql: $F{'sql'}"
if
$F
{
'sql'
}
=~
/;/
;
push
(
@wherepart
,
"( $F{'sql'} )"
);
}
# This is evil. We should never allow a user to directly append SQL to
# any query without a huge amount of validation. Even then, it would
# be a bad idea. Beware that uncommenting this will allow someone to
# peak at virtually anything they want in the bugs database.
# if (defined $F{'sql'}) {
# die "Invalid sql: $F{'sql'}" if $F{'sql'} =~ /;/;
# push(@wherepart, "( $F{'sql'} )");
# }
my
@legal_fields
=
(
"product"
,
"version"
,
"rep_platform"
,
"op_sys"
,
"bug_status"
,
"resolution"
,
"priority"
,
"bug_severity"
,
...
...
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