Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
http: check for existance in resetHeadersTimeoutOnReqEnd#26402
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
mcollina commented Mar 2, 2019 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Mar 2, 2019
mcollina commented Mar 2, 2019
cc @nodejs/http @nodejs/lts @nodejs/release we would likely have to backport this down to 6 for safety, given that we do not know how this condition is triggered. |
mcollina commented Mar 2, 2019
richardlau commented Mar 2, 2019
mcollina commented Mar 2, 2019
@richardlau good spot! Fixed. |
Trott commented Mar 2, 2019
Optional typo fix for commit title: s/existance/existence/ |
Trott commented Mar 2, 2019 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Here's a test that reproduces the error in #26366 in current master. 'use strict';require('../common');consthttp=require('http');constserver=http.createServer((req,res)=>{res.writeHead(200,{'Content-Type': 'text/plain'});res.write('okay',()=>{deleteres.socket.parser});res.end();});server.listen(1337,'127.0.0.1');constreq=http.request({port: 1337,host: '127.0.0.1',method: 'GET',});req.end(); |
Trott commented Mar 2, 2019
Is it worth adding the code in the previous comment (or something like it) as a test? |
mcollina commented Mar 2, 2019
I think so. However it’s not clear if we are doing it in core or not, or it is just user specific (somehow). |
Trott commented Mar 2, 2019
By the way, #26404 is basically the same thing but on the client end rather than the server end. |
lib/_http_server.js Outdated
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.
Changing to parser != null would work also and be a bit safer
lpinca commented Mar 3, 2019
mcollina commented Mar 3, 2019
The overall problem with supporting a “delete” case is that it could trigger the vulnerability we are trying to protect against. |
socket.parser can be undefined under unknown circumstances. This is a fix for a bug I cannot reproduce but it is affecting people. Fixes: nodejs#26366
mcollina commented Mar 6, 2019
mcollina commented Mar 6, 2019
Landed in 3c83f93 |
mcollina commented Mar 6, 2019
@nodejs/lts this should be backported asap to all lines. |
socket.parser can be undefined under unknown circumstances. This is a fix for a bug I cannot reproduce but it is affecting people. Fixes: nodejs#26366 PR-URL: nodejs#26402 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
richardlau commented Mar 6, 2019
Probably too late for 11.11.0, but ping @BridgeAR. |
BridgeAR commented Mar 6, 2019
@richardlau I would rather pull that into the release afterwards. |
lpinca commented Mar 7, 2019 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I've finally found the root issue behind #26366 or better in https://github.com/eggjs/egg-socket.io. The problem is that our There is nothing wrong with this fix but the problem is in egg-socket.io and may arise again. I think the regression test added here does not make much sense. |
socket.parser can be undefined under unknown circumstances. This is a fix for a bug I cannot reproduce but it is affecting people. Fixes: nodejs#26366 PR-URL: nodejs#26402 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
socket.parser can be undefined under unknown circumstances. This is a fix for a bug I cannot reproduce but it is affecting people. Fixes: #26366 PR-URL: #26402 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
socket.parser can be undefined under unknown circumstances. This is a fix for a bug I cannot reproduce but it is affecting people. Fixes: #26366 PR-URL: #26402 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
socket.parser can be undefined under unknown circumstances. This is a fix for a bug I cannot reproduce but it is affecting people. Fixes: #26366 PR-URL: #26402 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
socket.parser can be undefined under unknown circumstances.
This is a fix for a bug I cannot reproduce but it is affecting
people.
Fixes: #26366
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes