summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2016-04-14 21:03:00 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2016-04-14 21:03:00 +0200
commit90d86a9744883ccc120a0a955ffade72990e1505 (patch)
tree07fd038fc41a2de0259f2f7c6a9de0d55e8a1e34 /attachment.cgi
parentae22da8710d00232d28b7c6b9093d2b7e33b0627 (diff)
downloadbugzilla-90d86a9744883ccc120a0a955ffade72990e1505.tar.gz
bugzilla-90d86a9744883ccc120a0a955ffade72990e1505.tar.xz
Bug 1088022 - Bump min version to CGI 4.09
r=dkl
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi10
1 files changed, 5 insertions, 5 deletions
diff --git a/attachment.cgi b/attachment.cgi
index eab42903d..b74930306 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -330,8 +330,8 @@ sub view {
# Bug 111522: allow overriding content-type manually in the posted form
# params.
- if (defined $cgi->param('content_type')) {
- $contenttype = $attachment->_check_content_type($cgi->param('content_type'));
+ if (my $content_type = $cgi->param('content_type')) {
+ $contenttype = $attachment->_check_content_type($content_type);
}
# Return the appropriate HTTP response headers.
@@ -503,13 +503,13 @@ sub insert {
my ($timestamp) = $dbh->selectrow_array("SELECT NOW()");
# Detect if the user already used the same form to submit an attachment
- my $token = trim($cgi->param('token'));
+ my $token = trim(scalar $cgi->param('token'));
check_token_data($token, 'create_attachment', 'index.cgi');
# Check attachments the user tries to mark as obsolete.
my @obsolete_attachments;
if ($cgi->param('obsolete')) {
- my @obsolete = $cgi->param('obsolete');
+ my @obsolete = $cgi->multi_param('obsolete');
@obsolete_attachments = Bugzilla::Attachment->validate_obsolete($bug, \@obsolete);
}
@@ -784,7 +784,7 @@ sub delete_attachment {
$attachment->datasize || ThrowUserError('attachment_removed');
# We don't want to let a malicious URL accidentally delete an attachment.
- my $token = trim($cgi->param('token'));
+ my $token = trim(scalar $cgi->param('token'));
if ($token) {
my ($creator_id, $date, $event) = Bugzilla::Token::GetTokenData($token);
unless ($creator_id