Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: do not use url.URL to support early node 6 and scp-style URLs#64

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@billneff79
Copy link

This gets rid of using url.URL, whichfixes#60 and#61

This in theory could also be applied to the latest branch. While node v6 isn't supported in the latest branch, it may be a more elegant fix to#60 than leaving url.URL in place.

@billneff79
Copy link
Author

Note: this is an alternative fix to those proposed in PR#62 and PR#63 . If those are merged, this one probably shouldn't be, and vice-versa

legacy.auth=whatwg.username||''
if(whatwg.password)legacy.auth+=':'+whatwg.password
// Replace the url decoded username:password with the url encoded username:password from the original url
legacy.auth=giturl.match(newRegExp('^[^/]+//([^@]+)@'))[1]
Copy link
Author

Choose a reason for hiding this comment

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

I originally had more checks here for URLs that did not have a protocol or slashes in it, and then I realized I couldn't test that because a URL without a protocol or slashes will never satisfylegacy.auth being truthy, so I removed them.

massto reacted with thumbs up emoji
@isaacs
Copy link
Contributor

Ah, I'd already landed#62 when I saw this, sorry. I agree, this is a bit of a cleaner fix for legacy v6 node users, but since that node version is only barely supported anyway, I think it's fine either way. Closing this for now, if we get complaints about urlencoding in auth in urls in node v6 less than 6.12, we can revisit it :)

massto reacted with thumbs up emoji

@isaacsisaacs closed thisFeb 26, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@billneff79@isaacs

[8]ページ先頭

©2009-2025 Movatter.jp