Skip to content

Commit

Permalink
fixed #139 - handle incorrect terminal modes list length
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Jun 22, 2022
1 parent 375e813 commit 05180b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion warpgate-protocol-ssh/src/server/russh_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ impl russh::server::Handler for ServerHandler {
session: Session,
) -> Self::FutureUnit {
let term = term.to_string();
let modes = modes.to_vec();
let modes = modes
.into_iter()
.take_while(|x| (x.0 as u8) > 0 && (x.0 as u8) < 160)
.map(Clone::clone)
.collect();
async move {
{
let mut this_session = self.session.lock().await;
Expand Down

0 comments on commit 05180b4

Please sign in to comment.