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

http: do not require a user name when using CURLAUTH_NEGOTIATE #9047

Closed

Conversation

Mareo
Copy link
Contributor

@Mareo Mareo commented Jun 24, 2022

In order to get Negotiate (SPNEGO) authentication to work in HTTP or
Kerberos V5 in the email protocols, you used to be required to provide a
(fake) user name (this concerns both curl and the lib) because the code
wrongly only considered authentication if there was a user name
provided, as in:

curl -u : --negotiate https://example.com/

This commit leverages the struct auth want member to figure out if the
user enabled CURLAUTH_NEGOTIATE, effectively removing the requirement of
setting a user name both in curl and the lib.

Signed-off-by: Marin Hannache git@mareo.fr
Reported-by: Enrico Scholz
Fixes https://sourceforge.net/p/curl/bugs/440/
Fixes #1161

docs/KNOWN_BUGS Outdated Show resolved Hide resolved
In order to get Negotiate (SPNEGO) authentication to work in HTTP you
used to be required to provide a (fake) user name (this concerned both
curl and the lib) because the code wrongly only considered
authentication if there was a user name provided, as in:

  curl -u : --negotiate https://example.com/

This commit leverages the `struct auth` want member to figure out if the
user enabled CURLAUTH_NEGOTIATE, effectively removing the requirement of
setting a user name both in curl and the lib.

Signed-off-by: Marin Hannache <git@mareo.fr>
Reported-by: Enrico Scholz
Fixes https://sourceforge.net/p/curl/bugs/440/
Fixes curl#1161
@Mareo Mareo force-pushed the negotiate-remove-user-name-requirement branch from f9f77a6 to 6215d38 Compare June 25, 2022 05:35
@Mareo Mareo requested a review from jay August 4, 2022 09:47
@Mareo
Copy link
Contributor Author

Mareo commented Jun 16, 2023

Hello, is there anything more I should do to help this PR moving forward?

@bagder bagder closed this in 67e9e3c Aug 14, 2023
@bagder
Copy link
Member

bagder commented Aug 14, 2023

Thanks, and sorry for taking so long.

@Mareo Mareo deleted the negotiate-remove-user-name-requirement branch August 14, 2023 08:44
ptitSeb pushed a commit to wasix-org/curl that referenced this pull request Sep 25, 2023
In order to get Negotiate (SPNEGO) authentication to work in HTTP you
used to be required to provide a (fake) user name (this concerned both
curl and the lib) because the code wrongly only considered
authentication if there was a user name provided, as in:

  curl -u : --negotiate https://example.com/

This commit leverages the `struct auth` want member to figure out if the
user enabled CURLAUTH_NEGOTIATE, effectively removing the requirement of
setting a user name both in curl and the lib.

Signed-off-by: Marin Hannache <git@mareo.fr>
Reported-by: Enrico Scholz
Fixes https://sourceforge.net/p/curl/bugs/440/
Fixes curl#1161
Closes curl#9047
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

[ curl-Bugs-1004841 ] --negotiate does not work without username/password
3 participants