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

Username and password in URL no longer works when using digest authentication through a proxy #4228

Closed
mikecrowe opened this issue Aug 15, 2019 · 3 comments

Comments

@mikecrowe
Copy link
Contributor

Ever since 46e1640, it appears that attempts to use a username and password as part of an HTTP URL whilst communicating via a proxy fails. libcurl does not send an Authorization header.

Steps to reproduce:

curl --proxy http://proxy:3128/ --digest http://unittest:password@host/

Originally raised in the thread at https://curl.haxx.se/mail/lib-2019-08/0002.html

Test case added in https://github.com/mikecrowe/curl/tree/mac/authentication-in-url-with-proxy-bug

@bagder
Copy link
Member

bagder commented Aug 15, 2019

test335 from Mike's repo

bagder added a commit that referenced this issue Aug 15, 2019
When a username and password are provided in the URL, they were not
correctly stored and remembered in the easy handle, only for the
connection, so when doing HTTP auth that uses multiple connections (like
Digest) curl mishaved.

Regression from 46e1640 (7.62.0)

Test case 335 added to verify.

Reported-by: Mike Crowe

Fixes #4228
bagder added a commit that referenced this issue Aug 15, 2019
When a username and password are provided in the URL, they were wrongly
removed from the stored URL so that subsequent uses of the same URL
wouldn't find the crendentials. This made doing HTTP auth with multiple
connections (like Digest) mishave.

Regression from 46e1640 (7.62.0)

Test case 335 added to verify.

Reported-by: Mike Crowe

Fixes #4228
@bagder bagder closed this as completed in 68fab35 Aug 16, 2019
@mikecrowe
Copy link
Contributor Author

That fix works perfectly. Thanks!

@bagder
Copy link
Member

bagder commented Aug 17, 2019

Thanks for confirming!

@lock lock bot locked as resolved and limited conversation to collaborators Nov 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

2 participants