summaryrefslogtreecommitdiff
path: root/lib/CPAN.pm
diff options
context:
space:
mode:
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;