curl icon indicating copy to clipboard operation
curl copied to clipboard

Sudden negotiate error with 5.2.1

Open vedoa opened this issue 1 year ago • 0 comments

Since the release of the 5.2.1 something similar to what was reported here https://github.com/curl/curl/issues/12112#issue-1941771424 happens trying to use gssnegotiate for authorization. The error happens every time i call the code bellow:

library(curl)
h <- new_handle()
handle_setup(h,
             .list = list(followlocation = T,
                          userpwd = ":",
                          httpauth = 4,
                          verbose = T
             )
)
handle_setheaders(h,
                  "Accept" = "text/plain",
                  "User-Agent" = "rawcurl")

d <- curl_fetch_memory(url = "https://redactedurl", handle = h)
rawToChar(d$content)

Error:

* WARNING: failed to open cookie file ""
*   Trying 172.28.127.110:443...
* Connected to redactedurl (172.28.127.110) port 443
* schannel: disabled automatic use of client certificate
* using HTTP/1.x
* Server auth using Negotiate with user ''

Since the client certificates are disabled on the initial call every further redirect fails (which is the desired behavior). For every other curl version including 5.2.0 i get

*   Trying 172.28.127.110:443...
* TCP_NODELAY set
* Connected to redactedurl (172.28.127.110) port 443 (#0)
* Server auth using Negotiate with user ''

as expected. I am aware that this is very hard to reproduce - but if someone experienced something similar it would be great to get some inputs how to solve it. As i mentioned, every other version, including 5.2.0, works as expected - no warning for the cookie file - certificates work as expected - re-directions are followed.

vedoa avatar Mar 20 '24 11:03 vedoa