Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-Whois-Raw CPAN distribution.

Report information
The Basics
Id: 47216
Status: resolved
Priority: 0/
Queue: Net-Whois-Raw

People
Owner: despair [...] cpan.org
Requestors: tlhackque [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.00
Fixed in: (no value)



Subject: Cache broken in taint mode
Broken in taint mode with cache. Problem is that attempting to unlink an expired cache file fails. Insecure dependency in unlink while running with -T switch at /usr/lib/perl5/site_perl/5.8.8/Net/Whois/Raw/Common.pm line 25. Quick fix is: # get whois from cache sub get_from_cache { my ($query, $cache_dir, $cache_time) = @_; return undef unless $cache_dir; mkdir $cache_dir unless -d $cache_dir; my $now = time; # clear the cache foreach ( glob("$cache_dir/*") ) { my $mtime = ( stat($_) )[9] or next; my $elapsed = $now - $mtime; #TL - replace 1 line with 5 # unlink $_ if ( $elapsed / 60 >= $cache_time ); $_ =~ m/^(.*)$/; my $fn = $1; $elapsed =~ m/^(.*)$/; $elapsed = $1; unlink $fn if ( $elapsed / 60 >= $cache_time ); ## } Net-Whois-Raw V 2.00; Perl 5.8.8; Fedora 6
Fixed in 2.11.