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
73fd49ff
Commit
73fd49ff
authored
Jul 06, 2004
by
bugreport%peshkin.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 243463 Use a param to protect new charts from leaking information
r=justdave a=justdave
parent
4ab7a75f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
31 deletions
+53
-31
chart.cgi
chart.cgi
+4
-0
defparams.pl
defparams.pl
+11
-0
editproducts.cgi
editproducts.cgi
+32
-27
menu.html.tmpl
template/en/default/reports/menu.html.tmpl
+6
-4
No files found.
chart.cgi
View file @
73fd49ff
...
@@ -84,6 +84,10 @@ if ($action eq "search") {
...
@@ -84,6 +84,10 @@ if ($action eq "search") {
Bugzilla
->
login
(
LOGIN_REQUIRED
);
Bugzilla
->
login
(
LOGIN_REQUIRED
);
UserInGroup
(
Param
(
"chartgroup"
))
||
ThrowUserError
(
"authorization_failure"
,
{
action
=>
"use this feature"
});
# Only admins may create public queries
# Only admins may create public queries
UserInGroup
(
'admin'
)
||
$cgi
->
delete
(
'public'
);
UserInGroup
(
'admin'
)
||
$cgi
->
delete
(
'public'
);
...
...
defparams.pl
View file @
73fd49ff
...
@@ -1035,6 +1035,17 @@ Reason: %reason%
...
@@ -1035,6 +1035,17 @@ Reason: %reason%
},
},
{
{
name
=>
'chartgroup'
,
desc
=>
'The name of the group of users who can use the "New Charts" '
.
'feature. Administrators should ensure that the public categories '
.
'and series definitions do not divulge unwanted information '
.
'before enabling this for an untrusted population. If left blank, '
.
'no users will be able to use New Charts.'
,
type
=>
't'
,
default
=>
''
},
{
name
=>
'insidergroup'
,
name
=>
'insidergroup'
,
desc
=>
'The name of the group of users who can see/change private '
.
desc
=>
'The name of the group of users who can see/change private '
.
'comments and attachments.'
,
'comments and attachments.'
,
...
...
editproducts.cgi
View file @
73fd49ff
...
@@ -271,6 +271,10 @@ if ($action eq 'add') {
...
@@ -271,6 +271,10 @@ if ($action eq 'add') {
print
"</TR><TR>\n"
;
print
"</TR><TR>\n"
;
print
" <TH ALIGN=\"right\">Version:</TH>\n"
;
print
" <TH ALIGN=\"right\">Version:</TH>\n"
;
print
" <TD><INPUT SIZE=64 MAXLENGTH=255 NAME=\"version\" VALUE=\"unspecified\"></TD>\n"
;
print
" <TD><INPUT SIZE=64 MAXLENGTH=255 NAME=\"version\" VALUE=\"unspecified\"></TD>\n"
;
print
"</TR><TR>\n"
;
print
" <TH ALIGN=\"right\">Create chart datasets for this product:</TH>\n"
;
print
" <TD><INPUT TYPE=CHECKBOX NAME=\"createseries\" VALUE=1></TD>"
;
print
"</TR>\n"
;
print
"</TABLE>\n<HR>\n"
;
print
"</TABLE>\n<HR>\n"
;
print
"<INPUT TYPE=SUBMIT VALUE=\"Add\">\n"
;
print
"<INPUT TYPE=SUBMIT VALUE=\"Add\">\n"
;
...
@@ -389,36 +393,37 @@ if ($action eq 'new') {
...
@@ -389,36 +393,37 @@ if ($action eq 'new') {
CONTROLMAPNA
.
", 0)"
);
CONTROLMAPNA
.
", 0)"
);
}
}
# Insert default charting queries for this product.
if
(
$::FORM
{
createseries
})
{
# If they aren't using charting, this won't do any harm.
# Insert default charting queries for this product.
GetVersionTable
();
# If they aren't using charting, this won't do any harm.
GetVersionTable
();
my
@series
;
my
@series
;
# We do every status, every resolution, and an "opened" one as well.
foreach
my
$bug_status
(
@::legal_bug_status
)
{
# We do every status, every resolution, and an "opened" one as well.
push
(
@series
,
[
$bug_status
,
"bug_status=$bug_status"
]);
foreach
my
$bug_status
(
@::legal_bug_status
)
{
}
push
(
@series
,
[
$bug_status
,
"bug_status=$bug_status"
]);
}
foreach
my
$resolution
(
@::legal_resolution
)
{
foreach
my
$resolution
(
@::legal_resolution
)
{
next
if
!
$resolution
;
next
if
!
$resolution
;
push
(
@series
,
[
$resolution
,
"resolution=$resolution"
]);
push
(
@series
,
[
$resolution
,
"resolution=$resolution"
]);
}
}
# For localisation reasons, we get the name of the "global" subcategory
# For localisation reasons, we get the name of the "global" subcategory
# and the title of the "open" query from the submitted form.
# and the title of the "open" query from the submitted form.
my
@openedstatuses
=
(
"UNCONFIRMED"
,
"NEW"
,
"ASSIGNED"
,
"REOPENED"
);
my
@openedstatuses
=
(
"UNCONFIRMED"
,
"NEW"
,
"ASSIGNED"
,
"REOPENED"
);
my
$query
=
join
(
"&"
,
map
{
"bug_status=$_"
}
@openedstatuses
);
my
$query
=
join
(
"&"
,
map
{
"bug_status=$_"
}
@openedstatuses
);
push
(
@series
,
[
$::FORM
{
'open_name'
},
$query
]);
push
(
@series
,
[
$::FORM
{
'open_name'
},
$query
]);
foreach
my
$sdata
(
@series
)
{
foreach
my
$sdata
(
@series
)
{
my
$series
=
new
Bugzilla::
Series
(
undef
,
$product
,
my
$series
=
new
Bugzilla::
Series
(
undef
,
$product
,
$::FORM
{
'subcategory'
},
$::FORM
{
'subcategory'
},
$sdata
->
[
0
],
$::userid
,
1
,
$sdata
->
[
0
],
$::userid
,
1
,
$sdata
->
[
1
]
.
"&product=$product"
,
1
);
$sdata
->
[
1
]
.
"&product=$product"
,
1
);
$series
->
writeToDatabase
();
$series
->
writeToDatabase
();
}
}
}
# Make versioncache flush
# Make versioncache flush
unlink
"$datadir/versioncache"
;
unlink
"$datadir/versioncache"
;
...
...
template/en/default/reports/menu.html.tmpl
View file @
73fd49ff
...
@@ -64,10 +64,12 @@
...
@@ -64,10 +64,12 @@
plot the status and/or resolution of [% terms.bugs %] against
plot the status and/or resolution of [% terms.bugs %] against
time, for each product in your database.
time, for each product in your database.
</li>
</li>
<li>
[% IF UserInGroup(Param("chartgroup")) %]
<strong><a href="chart.cgi">New Charts</a></strong> -
<li>
plot any arbitrary search against time. Far more powerful.
<strong><a href="chart.cgi">New Charts</a></strong> -
</li>
plot any arbitrary search against time. Far more powerful.
</li>
[% END %]
</ul>
</ul>
[% PROCESS global/footer.html.tmpl %]
[% PROCESS global/footer.html.tmpl %]
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