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
aec6c53c
Commit
aec6c53c
authored
Mar 31, 2009
by
reed%reedloden.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 477420 - "Rename some of the token names used in attachment.cgi" [p=reed r=LpSolit a=LpSolit]
parent
dbd3c06a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
attachment.cgi
attachment.cgi
+6
-6
No files found.
attachment.cgi
View file @
aec6c53c
...
...
@@ -415,7 +415,7 @@ sub enter {
'component_id'
=>
$bug
->
component_id
});
$vars
->
{
'flag_types'
}
=
$flag_types
;
$vars
->
{
'any_flags_requesteeble'
}
=
grep
(
$_
->
is_requesteeble
,
@$flag_types
);
$vars
->
{
'token'
}
=
issue_session_token
(
'createattachment:'
);
$vars
->
{
'token'
}
=
issue_session_token
(
'create
_
attachment:'
);
print
$cgi
->
header
();
...
...
@@ -443,13 +443,13 @@ sub insert {
my
(
$creator_id
,
$date
,
$old_attach_id
)
=
Bugzilla::Token::
GetTokenData
(
$token
);
unless
(
$creator_id
&&
(
$creator_id
==
$user
->
id
)
&&
(
$old_attach_id
=~
"^createattachment:"
))
&&
(
$old_attach_id
=~
"^create
_
attachment:"
))
{
# The token is invalid.
ThrowUserError
(
'token_does_not_exist'
);
}
$old_attach_id
=~
s/^createattachment://
;
$old_attach_id
=~
s/^create
_
attachment://
;
if
(
$old_attach_id
)
{
$vars
->
{
'bugid'
}
=
$bugid
;
...
...
@@ -493,7 +493,7 @@ sub insert {
if
(
$token
)
{
trick_taint
(
$token
);
$dbh
->
do
(
'UPDATE tokens SET eventdata = ? WHERE token = ?'
,
undef
,
(
"createattachment:"
.
$attachment
->
id
,
$token
));
(
"create
_
attachment:"
.
$attachment
->
id
,
$token
));
}
$dbh
->
bz_commit_transaction
;
...
...
@@ -752,7 +752,7 @@ sub delete_attachment {
my
(
$creator_id
,
$date
,
$event
)
=
Bugzilla::Token::
GetTokenData
(
$token
);
unless
(
$creator_id
&&
(
$creator_id
==
$user
->
id
)
&&
(
$event
eq
'attachment'
.
$attachment
->
id
))
&&
(
$event
eq
'
delete_
attachment'
.
$attachment
->
id
))
{
# The token is invalid.
ThrowUserError
(
'token_does_not_exist'
);
...
...
@@ -795,7 +795,7 @@ sub delete_attachment {
}
else
{
# Create a token.
$token
=
issue_session_token
(
'attachment'
.
$attachment
->
id
);
$token
=
issue_session_token
(
'
delete_
attachment'
.
$attachment
->
id
);
$vars
->
{
'a'
}
=
$attachment
;
$vars
->
{
'token'
}
=
$token
;
...
...
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