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

http2: don't expose the original socket through the socket proxy #22650

Closed

Conversation

szmarczak
Copy link
Member

These functions expose the original socket:

session.socket.ref()
session.socket.unref()
session.socket.setEncoding()
session.socket.setKeepAlive()
session.socket.setNoDelay()

To avoid that, forward session.socket.ref to session.ref, session.socket.unref to session.unref and throw ERR_HTTP2_NO_SOCKET_MANIPULATION when accessing setEncoding, setKeepAlive or setNoDelay.

Refs: #22486

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added dont-land-on-v6.x http2 Issues or PRs related to the http2 subsystem. labels Sep 2, 2018
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

LGTM

@mcollina
Copy link
Member

mcollina commented Sep 3, 2018

Good work on your first contribution @szmarczak!

CI: https://ci.nodejs.org/job/node-test-pull-request/16980/ (:heavy_check_mark:)

Copy link
Member

@apapirovski apapirovski left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!! Edit: ugh... mobile UI...

@szmarczak
Copy link
Member Author

Thanks for doing this!! Edit: ugh... mobile UI...

Indeed, mobile UI doesn't look good :P

@mcollina
Copy link
Member

mcollina commented Sep 5, 2018

Landed in d6a4343

@mcollina mcollina closed this Sep 5, 2018
mcollina pushed a commit that referenced this pull request Sep 5, 2018
Refs: #22486

PR-URL: #22650
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Sep 5, 2018
Refs: #22486

PR-URL: #22650
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Sep 6, 2018
Refs: #22486

PR-URL: #22650
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: James M Snell <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 3, 2018
Refs: nodejs#22486

PR-URL: nodejs#22650
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: James M Snell <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 16, 2018
Refs: nodejs#22486

PR-URL: nodejs#22650
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BethGriggs pushed a commit that referenced this pull request Oct 17, 2018
Refs: #22486

Backport-PR-URL: #22850
PR-URL: #22650
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants