Skip Menu |

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

Report information
The Basics
Id: 43218
Status: resolved
Worked: 3 hours (180 min)
Priority: 0/
Queue: Net-SFTP-Foreign

People
Owner: salva [...] cpan.org
Requestors: toddr [...] cpanel.net
Cc:
AdminCc:

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



Subject: password in new does not handle stderr properly
I'm using openssh 5.1 with Net::SFTP::Foreign. My new looks like this: my %sftp_args = ( host => $host, user => $user, password => $pass, ssh_cmd => '/opt/perl588/site/openssh5.1/bin/ssh', more => ['-o'=> 'StrictHostKeyChecking=no', '-o' => 'NumberOfPasswordPrompts=1'], ssh_cmd_interface => 'ssh', ) my $sftp = Net::SFTP::Foreign->new(%sftp_args); If I run with a bad password, and exit if $sftp->error, I get this output without printing it: 'Permission denied (publickey,keyboard-interactive).' I have no objection that expect is not handling a bad password since I can use SSH's 'NumberOfPasswordPrompts option. But I need expect to trap the STDERR about why it failed. Right now, it's not and it's simply being thrown out during run. Do you know if this would be an easy fix?
Subject: Re: [rt.cpan.org #43218] password in new does not handle stderr properly
Date: Thu, 12 Feb 2009 02:57:52 -0800 (PST)
To: bug-Net-SFTP-Foreign [...] rt.cpan.org
From: Salvador Fandino <sfandino [...] yahoo.com>
This is actually in the module TODO list: http://cpansearch.perl.org/src/SALVA/Net-SFTP-Foreign-1.46/TODO In the meantime, see this PerlMonks post for a workaround: http://perlmonks.org/?node_id=713310 Cheers, - Salva Show quoted text
----- Original Message ----
> From: Todd E. Rinaldo via RT <bug-Net-SFTP-Foreign@rt.cpan.org> > Sent: Thursday, February 12, 2009 1:56:51 AM > Subject: [rt.cpan.org #43218] password in new does not handle stderr properly > > Wed Feb 11 19:56:51 2009: Request 43218 was acted upon. > Transaction: Ticket created by todd_rinaldo > Queue: Net-SFTP-Foreign > Subject: password in new does not handle stderr properly > Broken in: 1.46 > Severity: Important > Owner: Nobody > Requestors: todd.e.rinaldo@jpmorgan.com > Status: new > Ticket > > > I'm using openssh 5.1 with Net::SFTP::Foreign. > > My new looks like this: > my %sftp_args = ( > host => $host, > user => $user, > password => $pass, > ssh_cmd => '/opt/perl588/site/openssh5.1/bin/ssh', > more => ['-o'=> 'StrictHostKeyChecking=no', > '-o' => 'NumberOfPasswordPrompts=1'], > ssh_cmd_interface => 'ssh', > ) > my $sftp = Net::SFTP::Foreign->new(%sftp_args); > > If I run with a bad password, and exit if $sftp->error, I get this > output without printing it: > 'Permission denied (publickey,keyboard-interactive).' > > I have no objection that expect is not handling a bad password since I > can use SSH's 'NumberOfPasswordPrompts option. But I need expect to > trap the STDERR about why it failed. Right now, it's not and it's > simply being thrown out during run. > > Do you know if this would be an easy fix?
On Thu Feb 12 05:59:00 2009, sfandino@yahoo.com wrote: Show quoted text
> This is actually in the module TODO list: > > http://cpansearch.perl.org/src/SALVA/Net-SFTP-Foreign-1.46/TODO > > > In the meantime, see this PerlMonks post for a workaround: > > http://perlmonks.org/?node_id=713310
Your perlmonks explanation suggests doing this only for new. In the short term, wouldn't it make sense to also do this just for new? It seems like this would solve 80% of people's desire to trap STDERR for this module. Thanks,
Show quoted text
> Your perlmonks explanation suggests doing this only for new. In the > short term, wouldn't it make sense to also do this just for new? It > seems like this would solve 80% of people's desire to trap STDERR for > this module.
My question doesn't seem clear re-reading it. What I'm suggesting is simply doing the re-direct for STDERR on new only. Pump any errors detected into $self->{error}
supported in version 1.58_01 check constructor stderr_fh option