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
10b4a926
Commit
10b4a926
authored
Jan 24, 2011
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 621108: [SECURITY] Creating/editing charts lacks CSRF protection
r=dkl a=LpSolit
parent
f6c4abda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
chart.cgi
chart.cgi
+6
-2
edit-series.html.tmpl
template/en/default/reports/edit-series.html.tmpl
+2
-0
search-create-series.html.tmpl
template/en/default/search/search-create-series.html.tmpl
+1
-0
No files found.
chart.cgi
View file @
10b4a926
...
...
@@ -146,6 +146,8 @@ elsif ($action eq "wrap") {
}
elsif
(
$action
eq
"create"
)
{
assertCanCreate
(
$cgi
);
my
$token
=
$cgi
->
param
(
'token'
);
check_hash_token
(
$token
,
[
'create-series'
]);
my
$series
=
new
Bugzilla::
Series
(
$cgi
);
...
...
@@ -164,9 +166,11 @@ elsif ($action eq "edit") {
edit
(
$series
);
}
elsif
(
$action
eq
"alter"
)
{
assertCanEdit
(
$series_id
);
my
$series
=
assertCanEdit
(
$series_id
);
my
$token
=
$cgi
->
param
(
'token'
);
check_hash_token
(
$token
,
[
$series
->
id
,
$series
->
name
]);
# XXX - This should be replaced by $series->set_foo() methods.
my
$series
=
new
Bugzilla::
Series
(
$cgi
);
$series
=
new
Bugzilla::
Series
(
$cgi
);
# We need to check if there is _another_ series in the database with
# our (potentially new) name. So we call existsInDatabase() to see if
...
...
template/en/default/reports/edit-series.html.tmpl
View file @
10b4a926
...
...
@@ -40,6 +40,8 @@
[% PROCESS reports/series.html.tmpl
button_name = "Change Data Set" %]
<input type="hidden" name="action" value="alter">
<input type="hidden" name="token"
value="[% issue_hash_token([default.id, default.name]) FILTER html %]">
[% IF default.series_id %]
<input type="hidden" name="series_id" value="[% default.series_id %]">
...
...
template/en/default/search/search-create-series.html.tmpl
View file @
10b4a926
...
...
@@ -54,6 +54,7 @@
[% PROCESS reports/series.html.tmpl
button_name = "Create Data Set" %]
<input type="hidden" name="action" value="create">
<input type="hidden" name="token" value="[% issue_hash_token(['create-series']) FILTER html %]">
<script type="text/javascript">
document.chartform.category[0].selected = true;
...
...
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