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

Introduce security token and bind to 127.0.0.1 #46

Merged
merged 1 commit into from
Jul 25, 2016
Merged

Conversation

mantoni
Copy link
Owner

@mantoni mantoni commented Jul 24, 2016

This PR introduces a security token that is generated on server startup and is stored along with the port number in ~/.eslint_d. Each request has to prepend the token, separated by a blank from the remaining payload. Requests without a matching token will be ignored.

While this is a security fix, I am tempted to release this as a patch. However, at the same time this introduces a protocol break which will cause issues with eslintme. Fortunately, eslintme did not upgrade to 3.x or 4.x yet, so it should not cause any damage. I don't know of anybody else using the wire protocol.

Please send your feedback on this @moll and @ruyadorno. Thanks.

@mantoni
Copy link
Owner Author

mantoni commented Jul 24, 2016

The original discussion was on issue #45.

@ruyadorno
Copy link

👍 LGTM

thanks for the heads up, I'll make sure to release an update for eslintme once this lands

@moll
Copy link

moll commented Jul 25, 2016

Implementation-wise: you don't need to bring in an external dependency that fundamentally does the same thing you should, but for a totally different purpose.
Use Crypto.randomBytes and if necessary, encode them in ASCII. Scrap uuid.

@mantoni
Copy link
Owner Author

mantoni commented Jul 25, 2016

@moll Good point. Was too lazy there.

@mantoni mantoni merged commit 61a76ce into master Jul 25, 2016
mantoni added a commit that referenced this pull request Jul 25, 2016
@mantoni mantoni deleted the issue-45-secutiry branch July 25, 2016 20:08
@mantoni
Copy link
Owner Author

mantoni commented Jul 25, 2016

Released in v4.0.1 and v3.1.2.

josephfrazier added a commit to josephfrazier/prettier_d that referenced this pull request Jan 8, 2018
The server already listened on `127.0.0.1`, so we need to make sure the client does too.

Related to mantoni/eslint_d.js#46
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.

3 participants