Make sure that the client properly responds unrecognised global and channel requests

Tommoa
Jul 12, 2021, 12:11 PM
VRGEFKLCYW3L5RP2DTBDV4G46JQXNCIHTV2Q2LEVWAJRNRX2QQLAC

Dependencies

  • [2] 2WEO7OZL Version updates: getting rid of anyhow + moving to Tokio 1.0
  • [3] 7FRJYUI6 Reboot because of a bad change

Change contents

  • replacement in thrussh/src/client/encrypted.rs at line 451
    [3.402901][3.402901:402990]()
    info!("Unknown channel request {:?}", std::str::from_utf8(req));
    [3.402901]
    [3.402990]
    let wants_reply = r.read_byte().map_err(crate::Error::from)?;
    if wants_reply == 1 {
    if let Some(ref mut enc) = self.common.encrypted {
    self.common.wants_reply = false;
    push_packet!(enc.write, {
    enc.write.push(msg::CHANNEL_FAILURE);
    enc.write.push_u32_be(channel_num.0)
    })
    }
    }
    info!(
    "Unknown channel request {:?} {:?}",
    std::str::from_utf8(req),
    wants_reply
    );
  • replacement in thrussh/src/client/encrypted.rs at line 495
    [2.23025][3.404212:404295](),[3.404212][3.404212:404295]()
    info!("Unhandled global request: {:?}", std::str::from_utf8(req));
    [2.23025]
    [3.404295]
    let wants_reply = r.read_byte().map_err(crate::Error::from)?;
    if let Some(ref mut enc) = self.common.encrypted {
    self.common.wants_reply = false;
    push_packet!(enc.write, enc.write.push(msg::REQUEST_FAILURE))
    }
    info!(
    "Unhandled global request: {:?} {:?}",
    std::str::from_utf8(req),
    wants_reply
    );