mirror of
https://github.com/curl/curl.git
synced 2026-07-24 16:47:16 +03:00
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
This commit is contained in:
parent
c90c78333b
commit
67e9e3cb1e
6 changed files with 10 additions and 18 deletions
|
|
@ -47,7 +47,7 @@ LD_PRELOAD=%PWD/libtest/.libs/libstubgss.so
|
|||
CURL_STUB_GSS_CREDS="KRB5_Alice"
|
||||
</setenv>
|
||||
<command>
|
||||
-u: --negotiate http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
--negotiate http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ LD_PRELOAD=%PWD/libtest/.libs/libstubgss.so
|
|||
CURL_STUB_GSS_CREDS="NTLM_Alice"
|
||||
</setenv>
|
||||
<command>
|
||||
-u: --negotiate http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
--negotiate http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ GSS-API
|
|||
curl --fail --negotiate to unauthenticated service fails
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u : --fail --negotiate
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --fail --negotiate
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ GSS-API
|
|||
curl --negotiate should not send empty POST request only
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u : --negotiate --data name=value
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --negotiate --data name=value
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue