URL Decode proxy usernames and passwords.
This commit is contained in:
Родитель
fc3bebd379
Коммит
91637590ea
|
@ -623,8 +623,10 @@ namespace Microsoft.Alm.Authentication
|
||||||
|
|
||||||
if (hasUserNameAndPassword)
|
if (hasUserNameAndPassword)
|
||||||
{
|
{
|
||||||
string userName = proxyUri.UserInfo.Substring(0, tokenIndex);
|
//Usernames and passwords in git config for proxies are expected to be Url encoded
|
||||||
string password = proxyUri.UserInfo.Substring(tokenIndex + 1);
|
//so decode them.
|
||||||
|
string userName = WebUtility.UrlDecode(proxyUri.UserInfo.Substring(0, tokenIndex));
|
||||||
|
string password = WebUtility.UrlDecode(proxyUri.UserInfo.Substring(tokenIndex + 1));
|
||||||
|
|
||||||
var proxyCreds = new NetworkCredential(userName, password);
|
var proxyCreds = new NetworkCredential(userName, password);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче