]> git.ipfire.org Git - thirdparty/curl.git/commit
http: do not require a user name when using CURLAUTH_NEGOTIATE
authorMarin Hannache <git@mareo.fr>
Mon, 14 Aug 2023 08:21:46 +0000 (10:21 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 14 Aug 2023 08:21:46 +0000 (10:21 +0200)
commit67e9e3cb1ea498cb94071dddb7653ab5169734b2
treee11ff97df5bec639a69d5087b1abf91665dab1c4
parentc90c78333bbd15d171d26d3d4d005066ed152ca5
http: do not require a user name when using CURLAUTH_NEGOTIATE

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 #1161
Closes #9047
docs/KNOWN_BUGS
lib/http.c
tests/data/test2056
tests/data/test2057
tests/data/test2077
tests/data/test2078