From 9488a8906592564ec2e7601041f3ea5484cde3cc Mon Sep 17 00:00:00 2001 From: "bbaetz%acm.org" <> Date: Mon, 5 May 2003 08:15:19 +0000 Subject: Bug 201816 - use CGI.pm for header output r=joel, a=justdave --- showattachment.cgi | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'showattachment.cgi') diff --git a/showattachment.cgi b/showattachment.cgi index bfe9ef988..82fc1ba9a 100755 --- a/showattachment.cgi +++ b/showattachment.cgi @@ -25,12 +25,16 @@ use strict; use lib qw(.); -require "CGI.pl"; +use Bugzilla; +use Bugzilla::Util; + +my $cgi = Bugzilla->cgi; + +my $id = $cgi->param('attach_id'); +detaint_natural($id) if defined $id; +$id ||= ""; + +print $cgi->redirect(-location=>"attachment.cgi?id=$id&action=view", + -status=>'301 Permanent Redirect'); -# Redirect to the new interface for displaying attachments. -detaint_natural($::FORM{'attach_id'}) if defined($::FORM{'attach_id'}); -my $id = $::FORM{'attach_id'} || ""; -print "Status: 301 Permanent Redirect\n"; -print "Location: attachment.cgi?id=$id&action=view\n\n"; exit; - -- cgit v1.2.3-24-g4f1b