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
721dfc64
Commit
721dfc64
authored
Jan 22, 2011
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 621109: Column changing lacks CSRF protection
r=dkl a=mkanat
parent
66a3af32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
colchange.cgi
colchange.cgi
+14
-5
change-columns.html.tmpl
template/en/default/list/change-columns.html.tmpl
+5
-0
No files found.
colchange.cgi
View file @
721dfc64
...
...
@@ -33,6 +33,7 @@ use Bugzilla::CGI;
use
Bugzilla::Search::
Saved
;
use
Bugzilla::
Error
;
use
Bugzilla::
User
;
use
Bugzilla::
Token
;
use
Storable
qw(dclone)
;
...
...
@@ -86,6 +87,19 @@ $vars->{'columns'} = $columns;
my
@collist
;
if
(
defined
$cgi
->
param
(
'rememberedquery'
))
{
my
$search
;
if
(
defined
$cgi
->
param
(
'saved_search'
))
{
$search
=
new
Bugzilla::Search::
Saved
(
$cgi
->
param
(
'saved_search'
));
}
my
$token
=
$cgi
->
param
(
'token'
);
if
(
$search
)
{
check_hash_token
(
$token
,
[
$search
->
id
,
$search
->
name
]);
}
else
{
check_hash_token
(
$token
,
[
'default-list'
]);
}
my
$splitheader
=
0
;
if
(
defined
$cgi
->
param
(
'resetit'
))
{
@collist
=
DEFAULT_COLUMN_LIST
;
...
...
@@ -123,11 +137,6 @@ if (defined $cgi->param('rememberedquery')) {
$vars
->
{
'message'
}
=
"change_columns"
;
my
$search
;
if
(
defined
$cgi
->
param
(
'saved_search'
))
{
$search
=
new
Bugzilla::Search::
Saved
(
$cgi
->
param
(
'saved_search'
));
}
if
(
$cgi
->
param
(
'save_columns_for_search'
)
&&
defined
$search
&&
$search
->
user
->
id
==
Bugzilla
->
user
->
id
)
{
...
...
template/en/default/list/change-columns.html.tmpl
View file @
721dfc64
...
...
@@ -121,11 +121,16 @@
<p>
<input type="hidden" name="saved_search"
value="[% saved_search.id FILTER html%]" >
<input type="hidden" name="token"
value="[% issue_hash_token([saved_search.id, saved_search.name]) FILTER html %]">
<input type="checkbox" id="save_columns_for_search" checked="checked"
name="save_columns_for_search" value="1">
<label for="save_columns_for_search">Save this column list only
for search '[% saved_search.name FILTER html %]'</label>
</p>
[% ELSE %]
<input type="hidden" name="token"
value="[% issue_hash_token(['default-list']) FILTER html %]">
[% END %]
<p>
...
...
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