Skip to content

plugins: wss-proxy should not return invalid JSON if sed does not exist. #8256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rustyrussell
Copy link
Contributor

@rustyrussell rustyrussell commented May 2, 2025

We try to do a JSON response if Python is not present, but it assumes sed. We should cleanly exit on errors.

Before:

$ PATH=/tmp ./plugins/wss-proxy/wss-proxy
Something

./plugins/wss-proxy/wss-proxy: 12: sed: not found
{"jsonrpc":"2.0","id":,"result":{"disable":"No python3 binary found"}}

After:

$ PATH=/tmp ./plugins/wss-proxy/wss-proxy
something

./plugins/wss-proxy/wss-proxy: 12: sed: not found

Changelog-None
Reported-by: @cdecker

@rustyrussell rustyrussell added this to the v25.05 milestone May 2, 2025
We try to do a JSON response if Python is not present, but it assumes sed.  We should cleanly
exit on errors.

Before:

```
$ PATH=/tmp ./plugins/wss-proxy/wss-proxy
Something

./plugins/wss-proxy/wss-proxy: 12: sed: not found
{"jsonrpc":"2.0","id":,"result":{"disable":"No python3 binary found"}}
```

After:

```
$ PATH=/tmp ./plugins/wss-proxy/wss-proxy
something

./plugins/wss-proxy/wss-proxy: 12: sed: not found
```

Reported-by: Christian Decker
Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell force-pushed the wss-proxy-missing-sed branch from 97e87e4 to e9f11f8 Compare May 2, 2025 02:20
Copy link
Collaborator

@ShahanaFarooqui ShahanaFarooqui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack e9f11f8

@ShahanaFarooqui ShahanaFarooqui merged commit 2c57347 into ElementsProject:master May 2, 2025
37 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants