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

commented Aug 15, 2019

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

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

test335 from Mike's repo

bagder added a commit that referenced this issue Aug 15, 2019
url: extract and store username + password in the easy handle
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
http: fix use of credentials in URL when using HTTP proxy
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 in 68fab35 Aug 16, 2019

@mikecrowe

This comment has been minimized.

Copy link
Contributor Author

commented Aug 17, 2019

That fix works perfectly. Thanks!

@bagder

This comment has been minimized.

Copy link
Member

commented Aug 17, 2019

Thanks for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.