-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buggitGIT issuesGIT issuesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersverifiedVerification succeededVerification succeeded
Milestone
Description
- VS Code Version: 1.53.2
- OS Version: Manjaro unstable
- Git Version: 2.30.1
Steps to Reproduce:
- Execute git.clone command
- Enter https git url for a private repository (does not even need to exist, so for example
https://gitlab.com/haasef/test.git) - Askpass pops up with
Git: https://gitlab.com': (Press 'Enter' ...)(The last two characters':are from the host string and not the template)
Why is this an issue?
- It does not create a problem when using the direct clone or github credentials provider (since that one does not check equality but only if
github.comis contained) - But: when adding a new credentials provider that checks for the explicit url, it fails (see gitlab-vscode-extension)
- This should have been fixed in Sometimes Git can't authenticate against GitHub #115037 but the fix does not handle a
:in the end
More Information:
- askpass-main recieves:
[ "/home/felix/Documents/coding/vscode/.build/electron/code-oss", "/home/felix/Documents/coding/vscode/extensions/git/out/askpass-main.js", "Username", "for", "'https://gitlab.com':", ] - and parses the host as
https://gitlab.com':instead ofhttps://gitlab.com
Suggested fix:
diff --git a/extensions/git/src/askpass-main.ts b/extensions/git/src/askpass-main.ts
index c15dd583fa..f17dc63463 100644
--- a/extensions/git/src/askpass-main.ts
+++ b/extensions/git/src/askpass-main.ts
@@ -30,7 +30,7 @@ function main(argv: string[]): void {
const output = process.env['VSCODE_GIT_ASKPASS_PIPE'] as string;
const request = argv[2];
- const host = argv[4].replace(/^["']+|["']+$/g, '');
+ const host = argv[4].replace(/^["']+|["':]+$/g, '');
const ipcClient = new IPCClient('askpass');
ipcClient.call({ request, host }).then(res => {Does this issue occur when all extensions are disabled?: Yes (Was tested and debugged on master)
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buggitGIT issuesGIT issuesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersverifiedVerification succeededVerification succeeded