summaryrefslogtreecommitdiff
path: root/lib/CPAN.pm
diff options
context:
space:
mode:
authorAudrey Tang <cpan@audreyt.org>2003-07-29 17:58:35 +0800
committerJarkko Hietaniemi <jhi@iki.fi>2003-07-29 10:36:25 +0000
commit7a34a24b301fbc19c9ae40dd163e0135ac9cb09e (patch)
treec1f5011d7647f6d1c8ed8985246061e43fdbe89b /lib/CPAN.pm
parentc176c0147dbd70bb78673068520e411c1fb5745c (diff)
downloadperl-7a34a24b301fbc19c9ae40dd163e0135ac9cb09e.tar.gz
unlink pre-PGP-signed CHECKSUM
Message-ID: <20030729015834.GA7149@not.autrijus.org> p4raw-id: //depot/perl@20295
Diffstat (limited to 'lib/CPAN.pm')
-rw-r--r--lib/CPAN.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CPAN.pm b/lib/CPAN.pm
index 81b335be56..fb65e6130f 100644
--- a/lib/CPAN.pm
+++ b/lib/CPAN.pm
@@ -3666,6 +3666,14 @@ sub dir_listing {
my $lc_want =
File::Spec->catfile($CPAN::Config->{keep_source_where},
"authors", "id", @$chksumfile);
+
+ my $fh = FileHandle->new;
+ if (open($fh, $lc_want)){
+ # purge and refetch old (pre-PGP) CHECKSUMS; they are a security hazard
+ my $line = <$fh>; close $fh;
+ unlink($lc_want) unless $line =~ /PGP/;
+ }
+
local($") = "/";
# connect "force" argument with "index_expire".
my $force = 0;