Enabling Handling Percent Encoded Username/Password With URLs#1813
Enabling Handling Percent Encoded Username/Password With URLs#1813DavidTPate wants to merge 2 commits intonodejs:masterfrom DavidTPate:url-with-encoded-colon
Conversation
|
Running the tests locally I'm currently hitting a failure with |
lib/url.js
Outdated
There was a problem hiding this comment.
I think this else if can be removed, because I don't see how someone would create an object which is an instance of the Url module and has a value for auth but not username.
There was a problem hiding this comment.
What we found in the run-up to 2.0.0 was that people do crazy things like delete myUrl.auth :-/
|
Just a note that RFC 3986 is not the correct standard to reference for this; instead we follow http://url.spec.whatwg.org/ which obsoletes the RFC and better matches what browsers do. I imagine this change is fine since you said in the previous thread that we don't currently match browsers, but since I saw you referring to the RFC several times I thought it'd be good to step in so you don't end up wasting time trekking through it. |
|
Thanks @domenic I'll take a look through the link you sent and make sure the specs are matching. |
… causing a discrepancy.
|
@domenic Finally had a chance to go through and dig into this some more. Everything is passing for me locally now, not sure how to kick off Jenkins to make sure it works on all of the build targets. |
|
@DavidTPate I can run a CI but could you rebase onto master first? |
|
@brendanashworth Cool. I'm moving this weekend (so don't have time) but next week I'll make it a priority to rebase and let you know once it's done. |
|
@DavidTPate ... ping ... have you had a chance to look at this again? |
|
This hasn't had any activity in half a year. Going to close now, if anyone wants to resume work or discussion feel free to reopen. |
|
Fine with closing the PR but this is still definitely a legitimate issue. Our url parsing definitely has issues. |
|
Of course, #1802 is still open and I have no intention to close issues about confirmed bugs :) |
This PR is the beginning of handling the issue raised in #1802 where parsing a URI such as
http://us%3Aer:pass%3Aword@localhost/results in theauthproperty of the parsed URI to beus:er:pass:wordwhich doesn't allow a separation of the username/password parts.To account for this, the
usernameandpasswordare being broken out into separate properties of the parsed URI and theauthparameter is kept with the same legacy functionality for backwards compatibility.