GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — http: normalize CONNECT request paths by efekrskl · Pull Request #64876 · nodejs/node Conversation
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
efekrskl
force-pushed
the
fix/http-connect-path-url
branch
from
987fc94 to
8172f67
Compare
anonrig
reviewed
Uh oh!
There was an error while loading. Please reload this page.
anonrig
reviewed
Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## main #64876 +/- ## ========================================== - Coverage 90.29% 90.28% -0.02% ========================================== Files 760 790 +30 Lines 247061 271991 +24930 Branches 46584 51924 +5340 ========================================== + Hits 223096 245574 +22478 - Misses 15437 16906 +1469 - Partials 8528 9511 +983
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Efe Karasakal <[email protected]>
7cb68d6 to
673924c
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Sorry it's taken me so long to get to this. I've put some comments here, but I think generally I'm -0.5 on this. As is, I think it can be a breaking change, and the upside is quite small. More broadly, it changes the scope of HTTP validation we do in these APIs. Right now we don't do anything similar for other methods - we enforce syntactic correctness (no unescaped spaces, must be correctly framed & parseable) but we don't generally police anything else beyond that. If you want to send random strings as a cookie header, or send We could change that, it's an interesting idea, but if we're going to break this we might as well do something much larger. And to be honest I think it's not helpful: there's plenty of use cases for sending weird HTTP, notably including testing that your server correctly rejects it. This fits into a broader discussion about I think there's a central core we can do here safely and sensibly, roughly: if you specifically pass a URL as the request target and the method is CONNECT, then use the path without any leading slash as the target. No new errors or further validation. The risk of breakage there I think is much smaller (URL usage like this is quite unusual anyway, the correct behaviour was always ambiguous, and it'd only break for servers who exclusively accept the wrong format) and it solves the original issue. What do you think @efekrskl? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@pimterry thanks for the detailed review! Good points, and I agree. I've narrowed down the change quite a bit to only strip the leading slash from URL derived CONNECT targets. This should keep the fix as surgical as possible while still solving the original issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @efekrskl!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Failed to resume CI
Full Auto Start CI output |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in c0681e5 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Efe Karasakal <[email protected]> PR-URL: #64876 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Tim Perry <[email protected]>
Signed-off-by: Efe Karasakal <[email protected]> PR-URL: nodejs#64876 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Tim Perry <[email protected]>
Signed-off-by: Efe Karasakal <[email protected]> PR-URL: #64876 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Tim Perry <[email protected]>
Signed-off-by: Efe Karasakal <[email protected]> PR-URL: #64876 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Tim Perry <[email protected]>
Signed-off-by: Efe Karasakal <[email protected]> PR-URL: #64876 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Tim Perry <[email protected]>
Signed-off-by: Efe Karasakal <[email protected]> PR-URL: #64876 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Tim Perry <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Passing a URL instance with a CONNECT method results in an invalid path
There was an error while loading. Please reload this page.