Skip Menu |

This queue is for tickets about the Net-SCP-Expect CPAN distribution.

Report information
The Basics
Id: 32365
Status: new
Priority: 0/
Queue: Net-SCP-Expect

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

Bug Information
Severity: Important
Broken in: 0.12
Fixed in: 0.12



Subject: Password printed on STDOUT in the clear if timeout occurs before password is sent
IF TIMEOUT OCCURS HERE unless($scp->expect($timeout,-re=>'[Pp]assword.*?:|[Pp]assphrase.*?:')){ my $err = $scp->before() || $scp->match(); if($err){ if($handler){ $handler->($err) } print STD2OUT "Problem performing scp: $err"; } print STD2OUT "scp timed out while trying to connect to $host\n"; <SHOULD RETURN HERE> } ...... PASSWORD SENT ...... PASSWORD CAPTURED AS ERROR CASE BY 2ND REGEX AND PRINTED ON STDOUT unless($no_check || $verbose){ $scp->expect($timeout_err, [qr/[Pp]ass.*/ => sub{ my $error = $scp->before() || $scp->match(); $error=~s/\s*/$1/g; if($handler){ $handler->($error); } else{ print STD2OUT "Error: Bad password [$error]\n"; } } ], [qr/\w+.*/ => sub{ my $error = $scp->match() || $scp->before(); #$error=~s/\s*/$1/g; if($handler){ $handler->($error); } else{ print STD2OUT "Error - $error\n"; } } ], ['eof' => sub{} ], ); } else{ $scp->expect($timeout_err, ['eof' => sub { }]); }