diff options
author | Graham Barr <gbarr@pobox.com> | 2003-10-18 10:11:20 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2003-10-18 10:11:20 +0000 |
commit | 6a671f9cc89c63c5e9f7c8ad66dcbc916f387ff7 (patch) | |
tree | 8722fd0138a15ceab307884ff565b671416c1aea | |
parent | 29a7374a7dd6ca5f4e8ae4256172edf0f9268111 (diff) | |
download | perl-libnet-6a671f9cc89c63c5e9f7c8ad66dcbc916f387ff7.tar.gz |
Net::FTP
- Ensure values returned by PASV are used as decimal values and not octal if the server happens to return leading zeros
-rw-r--r-- | Net/FTP.pm | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -22,7 +22,7 @@ use Net::Config; use Fcntl qw(O_WRONLY O_RDONLY O_APPEND O_CREAT O_TRUNC); # use AutoLoader qw(AUTOLOAD); -$VERSION = "2.74"; # $Id: //depot/libnet/Net/FTP.pm#82 $ +$VERSION = "2.74"; # $Id: //depot/libnet/Net/FTP.pm#83 $ @ISA = qw(Exporter Net::Cmd IO::Socket::INET); # Someday I will "use constant", when I am not bothered to much about @@ -938,7 +938,7 @@ sub _dataconn if(defined ${*$ftp}{'net_ftp_pasv'}) { - my @port = split(/,/,${*$ftp}{'net_ftp_pasv'}); + my @port = map { 0+$_ } split(/,/,${*$ftp}{'net_ftp_pasv'}); $data = $pkg->new(PeerAddr => join(".",@port[0..3]), PeerPort => $port[4] * 256 + $port[5], |