Ensure that the terminal is reset correctly after prompting for a password.

Thanks to Jonathan for reporting this!
Fixes #84
This commit is contained in:
Sebastian Harl 2012-07-19 08:54:47 +02:00
parent 0c44bdc599
commit f4d9395adc
4 changed files with 4 additions and 0 deletions

View file

@ -168,6 +168,7 @@ if (! $plugin->opts->password) {
chomp($conf{'password'});
$term->setlflag($lflag | POSIX::ECHO);
$term->setattr(fileno(STDIN), TCSAFLUSH);
print "\n";
}

View file

@ -170,6 +170,7 @@ if (! $plugin->opts->password) {
chomp($conf{'password'});
$term->setlflag($lflag | POSIX::ECHO);
$term->setattr(fileno(STDIN), TCSAFLUSH);
print "\n";
}

View file

@ -346,6 +346,7 @@ sub connect
chomp($self->{'conf'}->{'password'});
$term->setlflag($lflag | POSIX::ECHO);
$term->setattr(fileno(STDIN), TCSAFLUSH);
print "\n";
}

View file

@ -353,6 +353,7 @@ sub connect
chomp($self->{'conf'}->{'password'});
$term->setlflag($lflag | POSIX::ECHO);
$term->setattr(fileno(STDIN), TCSAFLUSH);
print "\n";
}