Skip to content
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

update cliListener.js #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheComputerGenie
Copy link

Despite being inside a try/catch, data needs pre-validation of JSON.

If one were to send curl --http0.9 http://127.0.0.1:17117, the pool can crash with SyntaxError: Unexpected token 'G', "GET / HTTP"... is not valid JSON since curl includes headers.
Even sending curl --http0.9 http://127.0.0.1:17117 -d '{"test": "test"}' can cause the thread to never send back a reply (causing curl to lock up).

This isn't a patch to allow curl sends to be parsed; but, rather, a fix to protect the pool in any case where the server IP might be known and the port might be accessible or where the op may choose other CLI options.

Despite being inside a try/catch, data needs pre-validation of JSON
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.

1 participant