Skip Menu |

This queue is for tickets about the Net-SFTP-Foreign CPAN distribution.

Report information
The Basics
Id: 130098
Status: open
Priority: 0/
Queue: Net-SFTP-Foreign

People
Owner: Nobody in particular
Requestors: granter.shadow [...] gmail.com
Cc:
AdminCc:

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



Subject: "bad packet sequence" on ls of empty directory
Date: Wed, 17 Jul 2019 12:07:32 -0500
To: bug-Net-SFTP-Foreign [...] rt.cpan.org
From: Alan F <granter.shadow [...] gmail.com>
Net::SFTP::Foreign 1.90 $ perl -v This is perl, v5.10.1 (*) built for aix-thread-multi $ uname -a AIX CO_JS22_PA 1 7 0006187AD400 When executing a ls() of an empty directory, the following error is returned: Couldn't close remote file: bad packet sequence, expected 3, got 2 Script works fine if there is at least one file in the directory. Sample script: #!/usr/bin/perl use Net::SFTP::Foreign; $Net::SFTP::Foreign::debug = 25; $ftp = Net::SFTP::Foreign->new( "10.12.10.90", user => "CPIBatch", password => "xx" ) or die; my @files = @{ $ftp->ls( "leadsftp", names_only => 1 ) }; $ftp->error and die "Couldn't ls: " . $ftp->error; exit 0; Debug files are attached for both a good and a bad run. Sincerely, AJ

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #130098] "bad packet sequence" on ls of empty directory
Date: Fri, 4 Oct 2019 10:11:57 +0000 (UTC)
To: Alan F via RT <bug-Net-SFTP-Foreign [...] rt.cpan.org>
From: Salvador Fandino <sfandino [...] yahoo.com>
Whoa, I didn't expect bugs like this could still remain in the module after so many years! The issue was related to the server replying to a readdir operation with a listing of 0 entries which was wrongly handled (commonly, they reply with two entries for '.' and '..', and then and EOF). I have uploaded a beta version of the module that hopefully will fix this issue: https://metacpan.org/release/SALVA/Net-SFTP-Foreign-1.90_01 On Thursday, July 18, 2019, 4:33:46 AM GMT+2, Alan F via RT <bug-Net-SFTP-Foreign@rt.cpan.org> wrote: Wed Jul 17 13:08:12 2019: Request 130098 was acted upon. Transaction: Ticket created by granter.shadow@gmail.com       Queue: Net-SFTP-Foreign     Subject: "bad packet sequence" on ls of empty directory   Broken in: (no value)     Severity: (no value)       Owner: Nobody   Requestors: granter.shadow@gmail.com       Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=130098 > Net::SFTP::Foreign 1.90 $ perl -v This is perl, v5.10.1 (*) built for aix-thread-multi $ uname -a AIX CO_JS22_PA 1 7 0006187AD400 When executing a ls() of an empty directory, the following error is returned: Couldn't close remote file: bad packet sequence, expected 3, got 2 Script works fine if there is at least one file in the directory. Sample script: #!/usr/bin/perl use Net::SFTP::Foreign; $Net::SFTP::Foreign::debug = 25; $ftp = Net::SFTP::Foreign->new( "10.12.10.90", user => "CPIBatch", password => "xx" ) or die; my @files = @{ $ftp->ls( "leadsftp", names_only => 1 ) }; $ftp->error and die "Couldn't ls: " . $ftp->error; exit 0; Debug files are attached for both a good and a bad run. Sincerely, AJ