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
637fb098
Commit
637fb098
authored
Oct 16, 2013
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 911593: (CVE-2013-1733) [SECURITY] CSRF in process_bug.cgi
r=dkl a=sgreen
parent
e78f6c00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
process_bug.cgi
process_bug.cgi
+12
-11
No files found.
process_bug.cgi
View file @
637fb098
...
...
@@ -111,25 +111,24 @@ print $cgi->header() unless Bugzilla->usage_mode == USAGE_MODE_EMAIL;
# Check for a mid-air collision. Currently this only works when updating
# an individual bug.
if
(
defined
$cgi
->
param
(
'delta_ts'
))
{
my
$delta_ts_z
=
datetime_from
(
$cgi
->
param
(
'delta_ts'
));
my
$delta_ts
=
$cgi
->
param
(
'delta_ts'
);
if
(
$delta_ts
)
{
my
$delta_ts_z
=
datetime_from
(
$delta_ts
)
or
ThrowCodeError
(
'invalid_timestamp'
,
{
timestamp
=>
$delta_ts
});
my
$first_delta_tz_z
=
datetime_from
(
$first_bug
->
delta_ts
);
if
(
$first_delta_tz_z
ne
$delta_ts_z
)
{
(
$vars
->
{
'operations'
})
=
$first_bug
->
get_activity
(
undef
,
$cgi
->
param
(
'delta_ts'
));
ThrowCodeError
(
'undefined_field'
,
{
field
=>
'longdesclength'
})
if
!
defined
$cgi
->
param
(
'longdesclength'
);
if
(
$first_delta_tz_z
ne
$delta_ts_z
)
{
(
$vars
->
{
'operations'
})
=
$first_bug
->
get_activity
(
undef
,
$delta_ts
);
my
$start_at
=
$cgi
->
param
(
'longdesclength'
);
my
$start_at
=
$cgi
->
param
(
'longdesclength'
)
or
ThrowCodeError
(
'undefined_field'
,
{
field
=>
'longdesclength'
});
# Always sort midair collision comments oldest to newest,
# regardless of the user's personal preference.
my
$comments
=
$first_bug
->
comments
({
order
=>
"oldest_to_newest"
});
# The token contains the old delta_ts. We need a new one.
$cgi
->
param
(
'token'
,
issue_hash_token
([
$first_bug
->
id
,
$first_bug
->
delta_ts
]));
# Show midair if previous changes made other than CC
# and/or one or more comments were made
my
$do_midair
=
scalar
@$comments
>
$start_at
?
1
:
0
;
...
...
@@ -149,6 +148,8 @@ if (defined $cgi->param('delta_ts'))
$vars
->
{
'start_at'
}
=
$start_at
;
$vars
->
{
'comments'
}
=
$comments
;
$vars
->
{
'bug'
}
=
$first_bug
;
# The token contains the old delta_ts. We need a new one.
$cgi
->
param
(
'token'
,
issue_hash_token
([
$first_bug
->
id
,
$first_bug
->
delta_ts
]));
# Warn the user about the mid-air collision and ask them what to do.
$template
->
process
(
"bug/process/midair.html.tmpl"
,
$vars
)
...
...
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