Subject: | Empty stdin not handled correctly for SSH2 |
Distribution: Net-SSH-Perl-1.30
Perl version: 5.8.8
Operating System: Solaris 10 (Intel)
When a command is sent with standard input:
$ssh->cmd('cat - >local_file', $contents);
Net::SSH::Perl will not supply any input if $contents is empty, so the
server sits patiently waiting for it.
Changing line 140 in lib/Net/SSH/Perl/SSH2.pm from:
if ($stdin) {
to:
if (defined $stdin) {
fixes the problem (this is already handled correctly for SSH1).