-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Changes since 2.2.1:** - Fix an issue where duplicate "Personal Access Token" GitHub account options are shown when Visual Studio has a GitHub account signed-in (#1325 #1328) - Fix an issue with Azure DevOps Server (TFS) and Windows Integrated Authentication (#1331 #1332) - Fix an issue with OAuth redirects GitHub Enterprise Server (#1329 #1330) - Correctly handle non-ASCII username/passwords with the WPF UI helpers (#1287 #1326)
- Loading branch information
Showing
12 changed files
with
118 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.2.1.0 | ||
2.2.2.0 |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,6 +270,70 @@ public void WindowsCredentialManager_IsMatch( | |
Assert.Equal(expected, actual); | ||
} | ||
|
||
[PlatformFact(Platforms.Windows)] | ||
public void WindowsCredentialManager_IsMatch_NoNamespace_NotMatched() | ||
{ | ||
var win32Cred = new Win32Credential | ||
{ | ||
UserName = "test", | ||
TargetName = $"{WindowsCredentialManager.TargetNameLegacyGenericPrefix}https://example.com" | ||
}; | ||
|
||
var credManager = new WindowsCredentialManager(TestNamespace); | ||
|
||
bool result = credManager.IsMatch("https://example.com", null, win32Cred); | ||
|
||
Assert.False(result); | ||
} | ||
|
||
[PlatformFact(Platforms.Windows)] | ||
public void WindowsCredentialManager_IsMatch_DifferentNamespace_NotMatched() | ||
{ | ||
var win32Cred = new Win32Credential | ||
{ | ||
UserName = "test", | ||
TargetName = $"{WindowsCredentialManager.TargetNameLegacyGenericPrefix}:random-namespace:https://example.com" | ||
}; | ||
|
||
var credManager = new WindowsCredentialManager(TestNamespace); | ||
|
||
bool result = credManager.IsMatch("https://example.com", null, win32Cred); | ||
|
||
Assert.False(result); | ||
} | ||
|
||
[PlatformFact(Platforms.Windows)] | ||
public void WindowsCredentialManager_IsMatch_CaseSensitiveNamespace_NotMatched() | ||
{ | ||
var win32Cred = new Win32Credential | ||
{ | ||
UserName = "test", | ||
TargetName = $"{WindowsCredentialManager.TargetNameLegacyGenericPrefix}:nAmEsPaCe:https://example.com" | ||
}; | ||
|
||
var credManager = new WindowsCredentialManager("namespace"); | ||
|
||
bool result = credManager.IsMatch("https://example.com", null, win32Cred); | ||
|
||
Assert.False(result); | ||
} | ||
|
||
[PlatformFact(Platforms.Windows)] | ||
public void WindowsCredentialManager_IsMatch_NoNamespaceInQuery_IsMatched() | ||
{ | ||
var win32Cred = new Win32Credential | ||
{ | ||
UserName = "test", | ||
TargetName = $"{WindowsCredentialManager.TargetNameLegacyGenericPrefix}https://example.com" | ||
}; | ||
|
||
var credManager = new WindowsCredentialManager(); | ||
|
||
bool result = credManager.IsMatch("https://example.com", null, win32Cred); | ||
|
||
Assert.True(result); | ||
} | ||
|
||
[PlatformTheory(Platforms.Windows)] | ||
[InlineData("https://example.com", null, "https://example.com")] | ||
[InlineData("https://example.com", "bob", "https://[email protected]")] | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.Text; | ||
|
||
namespace GitCredentialManager; | ||
|
||
public static class EncodingEx | ||
{ | ||
public static readonly Encoding UTF8NoBom = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false); | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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