From 96c685a0cf75dcb3de4688674574a464b9a338db Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 29 May 2023 15:14:27 +0200 Subject: [PATCH 1/2] Check request protocol inbound allowed value --- lib/src/libp2p/collection.rs | 1 + wasm-node/CHANGELOG.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/src/libp2p/collection.rs b/lib/src/libp2p/collection.rs index e4f136e13d..a4fe87a033 100644 --- a/lib/src/libp2p/collection.rs +++ b/lib/src/libp2p/collection.rs @@ -1312,6 +1312,7 @@ where .request_response_protocols .iter() .enumerate() + .filter(|(_, p)| p.inbound_allowed) .find(|(_, p)| p.name == protocol_name) { self.messages_to_connections.push_back(( diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index ea3b2990dc..1a762a4534 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -6,6 +6,10 @@ - The parameter of `chainHead_unstable_follow` has been renamed from `runtimeUpdates` to `withRuntime` in accordance with the latest JSON-RPC specification changes. ([#624](https://github.com/smol-dot/smoldot/pull/624)) +### Fixed + +- Fix panic when receiving a networking request of a protocol not supported by smoldot. + ## 1.0.7 - 2023-05-25 ### Fixed From 4ed40b54677850e1a0c4528d5dae7cd427a72f2e Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 29 May 2023 15:15:15 +0200 Subject: [PATCH 2/2] PR link --- wasm-node/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index 1a762a4534..54be9ca331 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -8,7 +8,7 @@ ### Fixed -- Fix panic when receiving a networking request of a protocol not supported by smoldot. +- Fix panic when receiving a networking request of a protocol not supported by smoldot. ([#635](https://github.com/smol-dot/smoldot/pull/635)) ## 1.0.7 - 2023-05-25