mirror of
https://github.com/ovh/the-bastion.git
synced 2025-09-06 04:54:20 +08:00
fix: connect.pl: decode 2K bytes of the ttyrec instead of 1K to not miss messages
This commit is contained in:
parent
3925e67d43
commit
7da3ef3e25
1 changed files with 2 additions and 2 deletions
|
@ -143,11 +143,11 @@ if ($sshClientHasOptionE) {
|
|||
my @comments;
|
||||
my $header;
|
||||
if (open(my $fh_ttyrec, '<', $saveFile)) {
|
||||
read $fh_ttyrec, $header, 1000; # 1K if there's the host key changed warning
|
||||
read $fh_ttyrec, $header, 2000; # 2K if there's the host key changed warning
|
||||
close($fh_ttyrec);
|
||||
}
|
||||
elsif (-r "$saveFile.zst") {
|
||||
my $fnret = OVH::Bastion::execute(cmd => ['zstd', '-d', '-c', "$saveFile.zst"], max_stdout_bytes => 1000, must_succeed => 1);
|
||||
my $fnret = OVH::Bastion::execute(cmd => ['zstd', '-d', '-c', "$saveFile.zst"], max_stdout_bytes => 2000, must_succeed => 1);
|
||||
$header = join("\n", @{$fnret->value->{'stdout'} || []}) if $fnret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue