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
8ec9b2e7
Commit
8ec9b2e7
authored
Feb 01, 2002
by
bbaetz%student.usyd.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 122744 - charting fails taint checks
r=daa@distributed.net, gerv
parent
90e93955
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
reports.cgi
reports.cgi
+17
-0
No files found.
reports.cgi
View file @
8ec9b2e7
...
...
@@ -124,6 +124,10 @@ if (! defined $FORM{'product'}) {
||
DisplayError
(
"You entered an invalid output type."
)
&&
exit
;
# We've checked that the product exists, and that the user can see it
# This means that is OK to detaint
trick_taint
(
$FORM
{
'product'
});
# Output appropriate HTTP response headers
print
"Content-type: text/html\n"
;
# Changing attachment to inline to resolve 46897 - zach@zachlipton.com
...
...
@@ -516,6 +520,19 @@ sub chart_image_type {
sub
chart_image_name
{
my
(
$data_file
,
$type
)
=
@_
;
# This routine generates a filename from the requested fields. The problem
# is that we have to check the safety of doing this. We can't just require
# that the fields exist, because what stats were collected could change
# over time (eg by changing the resolutions available)
# Instead, just require that each field name consists only of letters
# and number
if
(
$FORM
{
'datasets'
}
!~
m/[A-Za-z0-9:]/
)
{
die
"Invalid datasets $FORM{'datasets'}"
;
}
# Since we pass the tests, consider it OK
trick_taint
(
$FORM
{
'datasets'
});
# Cache charts by generating a unique filename based on what they
# show. Charts should be deleted by collectstats.pl nightly.
my
$id
=
join
(
"_"
,
split
(
":"
,
$FORM
{
datasets
}));
...
...
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