diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index 4ffd2ffdea..65c038fdd9 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -6,6 +6,10 @@ - All `transactionWatch_unstable`-prefixed JSON-RPC functions have been renamed to `transactionWatch_v1`, in accordance with the latest changes in the JSON-RPC API specification. ([#1771](https://github.com/smol-dot/smoldot/pull/1771)) +### Fixed + +- Fix the `forbidWs` option being ignored when connecting to non-localhost addresses. Smoldot erroneously only took the value of `forbidNonLocalWs` in that situation. Connecting to a non-localhost address is now only done if both `forbidWs` and `forbidNonLocalWs` are `false`. ([#1790](https://github.com/smol-dot/smoldot/pull/1790)) + ## 2.0.24 - 2024-04-16 ### Changed diff --git a/wasm-node/javascript/src/internals/local-instance.ts b/wasm-node/javascript/src/internals/local-instance.ts index 0a0287b5b6..1b601bb93f 100644 --- a/wasm-node/javascript/src/internals/local-instance.ts +++ b/wasm-node/javascript/src/internals/local-instance.ts @@ -283,7 +283,7 @@ export async function startLocalInstance(config: Config, wasmModule: WebAssembly case 4: case 5: case 6: { - return config.forbidNonLocalWs ? 0 : 1 + return (config.forbidWs || config.forbidNonLocalWs) ? 0 : 1 } case 7: { return config.forbidWs ? 0 : 1