fix(openvpn/omi): password sent (#3395)

This commit is contained in:
qgarnier 2022-01-11 11:39:48 +01:00 committed by GitHub
parent 77e2f794ed
commit 73b1c1608d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,7 +159,7 @@ sub login {
$self->{output}->add_option_msg(short_msg => "Openvpn management interface require a password. please set --omi-password option");
$self->{output}->option_exit();
}
$self->write_omi_protocol(cmd => $self->{omi_password});
$self->write_omi_protocol(cmd => $self->{omi_password} . "\n");
$message = $self->read_omi_protocol(expected => '^(SUCCESS|ERROR):[^\n]*?\n');
if ($message =~ /^ERROR:(.*)/m) {
$self->{output}->add_option_msg(short_msg => "Password error [" . $1 . "]");