-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: do not allow socket manipulation #16330
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Thank you. Will sign off once the docs are added
lib/internal/http2/core.js
Outdated
case 'destroy': | ||
case 'emit': | ||
case 'end': | ||
case 'once': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appalling once and on should be ok. The rest of these look good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stupid autocorrect. Allowing not appalling
Because of the specific serialization and processing requirements of HTTP/2, sockets should not be directly manipulated. This forbids any interactions with destroy, emit, end, once, on, pause, read, resume and write methods of the socket. It also redirects setTimeout to session instead of socket. Fixes: nodejs#16252 Refs: nodejs#16211
e9cc55f
to
5bdb794
Compare
ping @jasnell — would like to get this in 9.0.0 if the doc & other changes look good (first commit is unchanged, just rebased so had to force push) |
One failure unrelated, going ahead with the merge. |
Landed in 73533a1 |
Because of the specific serialization and processing requirements of HTTP/2, sockets should not be directly manipulated. This forbids any interactions with destroy, emit, end, pause, read, resume and write methods of the socket. It also redirects setTimeout to session instead of socket. PR-URL: #16330 Fixes: #16252 Refs: #16211 Reviewed-By: James M Snell <[email protected]>
Because of the specific serialization and processing requirements of HTTP/2, sockets should not be directly manipulated. This forbids any interactions with destroy, emit, end, pause, read, resume and write methods of the socket. It also redirects setTimeout to session instead of socket. PR-URL: nodejs/node#16330 Fixes: nodejs/node#16252 Refs: nodejs/node#16211 Reviewed-By: James M Snell <[email protected]>
Because of the specific serialization and processing requirements of HTTP/2, sockets should not be directly manipulated. This forbids any interactions with destroy, emit, end, pause, read, resume and write methods of the socket. It also redirects setTimeout to session instead of socket. PR-URL: #16330 Fixes: #16252 Refs: #16211 Reviewed-By: James M Snell <[email protected]>
Because of the specific serialization and processing requirements of HTTP/2, sockets should not be directly manipulated. This forbids any interactions with destroy, emit, end, pause, read, resume and write methods of the socket. It also redirects setTimeout to session instead of socket. PR-URL: #16330 Fixes: #16252 Refs: #16211 Reviewed-By: James M Snell <[email protected]>
Because of the specific serialization and processing requirements of HTTP/2, sockets should not be directly manipulated. This forbids any interactions with destroy, emit, end, pause, read, resume and write methods of the socket. It also redirects setTimeout to session instead of socket. PR-URL: #16330 Fixes: #16252 Refs: #16211 Reviewed-By: James M Snell <[email protected]>
This LTS release comes with 87 commits. This includes 30 that are updates to lib/ or src/, 20 that are test related, 13 that are doc related, 19 which are build / tools related, and 4 commits which are updates to dependencies. Notable Changes: * doc: - add Gibson Fahnestock to Release team (Gibson Fahnestock) #16620 * deps: - update npm to 5.5.1 (Myles Borins) #16509 * http2: - The exposed http2 socket is no longer manipulatable (Anatoli Papirovski) #16330 * module: - support custom paths to require.resolve() (cjihrig) #16397 * util: - util.TextEncoder and util.TextDecoder are no longer experimental. There will no longer be a warning when they are used (James M Snell) #15743 PR-URL: #16630
This LTS release comes with 87 commits. This includes 30 that are updates to lib/ or src/, 20 that are test related, 13 that are doc related, 19 which are build / tools related, and 4 commits which are updates to dependencies. Notable Changes: * doc: - add Gibson Fahnestock to Release team (Gibson Fahnestock) #16620 * deps: - update npm to 5.5.1 (Myles Borins) #16509 * http2: - The exposed http2 socket is no longer manipulatable (Anatoli Papirovski) #16330 * module: - support custom paths to require.resolve() (cjihrig) #16397 * util: - util.TextEncoder and util.TextDecoder are no longer experimental. There will no longer be a warning when they are used (James M Snell) #15743 PR-URL: #16630
This LTS release comes with 87 commits. This includes 30 that are updates to lib/ or src/, 20 that are test related, 13 that are doc related, 19 which are build / tools related, and 4 commits which are updates to dependencies. Notable Changes: * doc: - add Gibson Fahnestock to Release team (Gibson Fahnestock) #16620 * deps: - update npm to 5.5.1 (Myles Borins) #16509 * http2: - The exposed http2 socket is no longer manipulatable (Anatoli Papirovski) #16330 * module: - support custom paths to require.resolve() (cjihrig) #16397 * util: - util.TextEncoder and util.TextDecoder are no longer experimental. There will no longer be a warning when they are used (James M Snell) #15743 PR-URL: #16630
This LTS release comes with 87 commits. This includes 30 that are updates to lib/ or src/, 20 that are test related, 13 that are doc related, 19 which are build / tools related, and 4 commits which are updates to dependencies. Notable Changes: * doc: - add Gibson Fahnestock to Release team (Gibson Fahnestock) #16620 * deps: - update npm to 5.5.1 (Myles Borins) #16509 * http2: - The exposed http2 socket is no longer manipulatable (Anatoli Papirovski) #16330 * module: - support custom paths to require.resolve() (cjihrig) #16397 * util: - util.TextEncoder and util.TextDecoder are no longer experimental. There will no longer be a warning when they are used (James M Snell) #15743 PR-URL: #16630
This LTS release comes with 87 commits. This includes 30 that are updates to lib/ or src/, 20 that are test related, 13 that are doc related, 19 which are build / tools related, and 4 commits which are updates to dependencies. Notable Changes: * doc: - add Gibson Fahnestock to Release team (Gibson Fahnestock) nodejs/node#16620 * deps: - update npm to 5.5.1 (Myles Borins) nodejs/node#16509 * http2: - The exposed http2 socket is no longer manipulatable (Anatoli Papirovski) nodejs/node#16330 * module: - support custom paths to require.resolve() (cjihrig) nodejs/node#16397 * util: - util.TextEncoder and util.TextDecoder are no longer experimental. There will no longer be a warning when they are used (James M Snell) nodejs/node#15743 PR-URL: nodejs/node#16630
This LTS release comes with 87 commits. This includes 30 that are updates to lib/ or src/, 20 that are test related, 13 that are doc related, 19 which are build / tools related, and 4 commits which are updates to dependencies. Notable Changes: * doc: - add Gibson Fahnestock to Release team (Gibson Fahnestock) nodejs/node#16620 * deps: - update npm to 5.5.1 (Myles Borins) nodejs/node#16509 * http2: - The exposed http2 socket is no longer manipulatable (Anatoli Papirovski) nodejs/node#16330 * module: - support custom paths to require.resolve() (cjihrig) nodejs/node#16397 * util: - util.TextEncoder and util.TextDecoder are no longer experimental. There will no longer be a warning when they are used (James M Snell) nodejs/node#15743 PR-URL: nodejs/node#16630
Because of the specific serialization and processing requirements of HTTP/2, sockets should not be directly manipulated. This forbids any interactions with destroy, emit, end, pause, read, resume and write methods of the socket. It also redirects setTimeout to session instead of socket. PR-URL: nodejs/node#16330 Fixes: nodejs/node#16252 Refs: nodejs/node#16211 Reviewed-By: James M Snell <[email protected]>
This LTS release comes with 87 commits. This includes 30 that are updates to lib/ or src/, 20 that are test related, 13 that are doc related, 19 which are build / tools related, and 4 commits which are updates to dependencies. Notable Changes: * doc: - add Gibson Fahnestock to Release team (Gibson Fahnestock) nodejs/node#16620 * deps: - update npm to 5.5.1 (Myles Borins) nodejs/node#16509 * http2: - The exposed http2 socket is no longer manipulatable (Anatoli Papirovski) nodejs/node#16330 * module: - support custom paths to require.resolve() (cjihrig) nodejs/node#16397 * util: - util.TextEncoder and util.TextDecoder are no longer experimental. There will no longer be a warning when they are used (James M Snell) nodejs/node#15743 PR-URL: nodejs/node#16630
This addresses #16252. I still need to update the documentation and potentially the error message but figured the review could get started.
We might need to discuss how much stuff we forbid on the socket, it's possible it's too restrictive currently or perhaps still too permissive.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
http2, test