Skip Menu |

This queue is for tickets about the Net-FTP-Recursive CPAN distribution.

Report information
The Basics
Id: 40799
Status: resolved
Priority: 0/
Queue: Net-FTP-Recursive

People
Owner: texasjdl [...] yahoo.com
Requestors: jebram [...] breitbandelite.de
Cc:
AdminCc:

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



Subject: Small bug in some error messages: Division instead of Interpolation of "/" due to missing quoting
Date: Mon, 10 Nov 2008 09:40:35 +0200
To: bug-Net-FTP-Recursive [...] rt.cpan.org
From: Manfred Jebram <jebram [...] breitbandelite.de>
I think I found a simple bug in: Net-FTP-Recursive-2.01.tar.gz that alos exists in: Net-FTP-Recursive-2.02.tar.gz The bug consists of a stated attempt at arithmetic division where interpolation of two variable values into a message string is intended. This bug is replicated in three places. This bug remained undetected because it only gets triggered if an attempt to copy a file with a name that happens to be invalid on the target system is detected. I tested using perl v5.10.0 built for i686-linux. (A SuSE Linux 9.3 with a i686 (32-bit) Kernel "2.6.11.4-21.17-default". Since the bug appears to be so simple, I think I can show it best using a simple patch file: ---------------- 8< ---------------- --- /usr/local/lib/perl5/site_perl/5.10.0/Net/FTP/Recursive.pm 2008-02-04 01:55:17.000000000 +0100 +++ /home/mj/scratch/Recursive.pm 2008-11-04 09:05:45.000000000 +0100 @@ -1,4 +1,4 @@ -package Net::FTP::Recursive; +package Net::FTP::Recursive; # Warning!!! Temporay fix added in lines 591, 602, 851 use Net::FTP; use Carp; @@ -589,7 +589,7 @@ if $ftp->debug; $success .= q{Could not make remote directory '} - . $remote_pwd/$filename + . qq{$remote_pwd/$filename} # Division => Interpolation fix -- M. Jebram, 2008-11-04 . qq{!\n}; } @@ -599,7 +599,7 @@ if $ftp->debug; $success .= qq{Could not change remote directory to '} - . $remote_pwd/$filename . qq{'!\n}; + . qq{$remote_pwd/$filename'!\n}; # Like in line 591. -- M. Jebram, 2008-11-04 next; } } @@ -856,7 +856,7 @@ ##now delete the directory we just came out of $ftp->rmdir($file->filename()) or $success .= 'Could not delete remote directory "' - . $remote_pwd/$filename + . qq{$remote_pwd/$filename} # Like in line 591, -- M.J., 2008-11-04 . qq{"!\n}; } } ---------------- >8 ---------------- Regards, Manfred Jebram -- jebram@breitbandelite.de +49-30-792 88 31 +49-172-31 61 47 2
This is fixed in 2.04. Thanks for the report!