fix(transport): harden QUIC admission boundaries
This commit is contained in:
@@ -388,6 +388,7 @@ impl ConnectionManifest {
|
||||
.iter()
|
||||
.any(|address| !bounded(address, 1, 256))
|
||||
|| !valid_dns_name(&self.gateway.public_identity)
|
||||
|| self.gateway.public_identity == self.gateway.id
|
||||
|| !(1..=4).contains(&self.tunnel.versions.len())
|
||||
|| self
|
||||
.tunnel
|
||||
@@ -621,6 +622,7 @@ struct StableError {
|
||||
|
||||
pub(crate) struct DecodedStableError {
|
||||
pub(crate) error: CoreError,
|
||||
pub(crate) code: String,
|
||||
pub(crate) retryable: bool,
|
||||
}
|
||||
|
||||
@@ -703,6 +705,7 @@ pub(crate) fn decode_stable_error(bytes: &[u8]) -> Result<DecodedStableError> {
|
||||
};
|
||||
Ok(DecodedStableError {
|
||||
error,
|
||||
code: stable.code,
|
||||
retryable: stable.retryable,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user