Skip Menu |

This queue is for tickets about the Net-Appliance-Session CPAN distribution.

Report information
The Basics
Id: 67487
Status: resolved
Priority: 0/
Queue: Net-Appliance-Session

People
Owner: OLIVER [...] cpan.org
Requestors: steve [...] computurn.com
Cc:
AdminCc:

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



During a Net::Telnet login, after entering a password, the code looks for a command prompt for a successful login, or a username/password prompt in case of authentication error. Net::Appliance::Session::Transport::Telnet just looks for a command prompt so that in the event of an authentication error, you get a timeout, which is not very desirable. To fix this, in Net::Appliance::Session::Transport::Telnet::_connect_core(), replace $self->waitfor($self->prompt) or $self->error('Login failed to remote host'); with (undef, $match) = $self->waitfor(Match => $self->prompt, Match => $self->pb->fetch('userpass_prompt')) or $self->error('Login failed to remote host'); if ($match =~ eval 'qr'. $self->pb->fetch('userpass_prompt')) { $self->error('Authentication failed to remote host'); } and move the 'my $match;' statement out of the preceding 'if ($self->do_login) {}' block so that it is in effect for the whole subroutine.
On Fri Apr 15 06:49:08 2011, STEVEC wrote: Show quoted text
> During a Net::Telnet login, after entering a password, the code looks > for a command prompt for a successful login, or a username/password > prompt in case of authentication error. > > Net::Appliance::Session::Transport::Telnet just looks for a command > prompt so that in the event of an authentication error, you get a > timeout, which is not very desirable.
Many thanks for the suggestion and details, I've now implemented this and pushed a new release (2.111080) to CPAN. regards, oliver.