From 90d86a9744883ccc120a0a955ffade72990e1505 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 14 Apr 2016 21:03:00 +0200 Subject: Bug 1088022 - Bump min version to CGI 4.09 r=dkl --- attachment.cgi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'attachment.cgi') 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 -- cgit v1.2.3-24-g4f1b