Unescape special characters in SSH repo paths#4557
Closed
emmax86 wants to merge 4 commits into
Closed
Conversation
ethomson
reviewed
Mar 3, 2018
| *password = gitno_unescape(git__substrdup(colon+1, u.field_data[UF_USERINFO].len - (colon+1-_userinfo))); | ||
| GITERR_CHECK_ALLOC(*password); | ||
| } else { | ||
| *username = git__substrdup(_userinfo, u.field_data[UF_USERINFO].len); |
Member
There was a problem hiding this comment.
While you're in here, can you unescape this as well? It should have been unescaped the whole time, but was overlooked.
Member
|
So thanks for raising this issue. While reviewing this, it feels to me like I think that we should consider taking this PR for the next release. We should perhaps think about cherry-picking df96f70 to avoid the unnecessary |
Member
|
Thanks for this; I've manually merged it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some repositories (i.e. VSTS repos) may have spaces in the repo path. The Git CLI is successfully able to handle this special case by unescaping special characters when constructing a command, e.g.
git-upload-pack '/Project with Spaces/_ssh/Repo with Spaces'. The proposed change would ensure the same in libgit2.