Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy authentication fails when called from dotnet restore if certain characters are present in the password #6761

Closed
orthoxerox opened this issue Apr 2, 2018 · 1 comment

Comments

@orthoxerox
Copy link

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):

NuGet version (x.x.x.xxx): 4.3.0.4406

dotnet.exe --version (if appropriate): 2.0.0

VS version (if appropriate): none

OS version (i.e. win10 v1607 (14393.321)): win7 v7601

Worked before? If so, with which NuGet version:

Detailed repro steps so we can see the same problem

  1. Be behind a proxy that requires HTTP authentication
  2. Have a password with the following characters /;?:)
  3. Configure NuGet to use them: nuget config -set http_proxy=http://mycorporateproxy nuget config -set http_proxy.user=myusername nuget config -set http_proxy.password=urlencodedpassword (the password can be urlencoded and escaped (^%) or escaped (^/^;^?^:^), it doesn't matter).
  4. Run dotnet add MyProject.csproj package Newtonsoft.Json. It fails. See below
  5. When the password is changed to a different one not containing the characters above, dotnet restore works fine.
  6. Both curl and maven work fine with the original password
  Writing C:\Users\myusername\AppData\Local\Temp\tmpC8E6.tmp
info : Adding PackageReference for package 'Newtonsoft.Json' into project 'MyProject.csproj'.
log  : Restoring packages for c:\...\MyProject.csproj...
info :   GET https://www.nuget.org/api/v2/FindPackagesById()?id='Newtonsoft.Json'
info :   ProxyAuthenticationRequired https://www.nuget.org/api/v2/FindPackagesById()?id='Newtonsoft.Json' 5843ms
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'https://www.nuget.org/api/v2/FindPackagesById()?id='Newtonsoft.Json''.
log  : Response status code does not indicate success: 407 (Proxy Authentication Required).
info :   GET https://www.nuget.org/api/v2/FindPackagesById()?id='Newtonsoft.Json'
info :   ProxyAuthenticationRequired https://www.nuget.org/api/v2/FindPackagesById()?id='Newtonsoft.Json' 734ms

Sorry the logs are not at the max verbosity, but I am currently not willing to change my corporate pw again to simlate the issue.

@nkolev92
Copy link
Member

Hey apologies for the late reply.

At this point it's been a while since this issue was filed. The side-effects of this seem equivalent to dotnet/runtime#26461, so I'm closing this as external.

If you are still seeing similar issues, please open a new issue where you have tried the repro with the updated clients for us to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants