Skip to content

Commit c6400bf

Browse files
committed
Merge branch 'dt/http-empty-auth'
http.emptyauth configuration is a way to allow an empty username to pass when attempting to authenticate using mechanisms like Kerberos. We took an unspecified (NULL) username and sent ":" (i.e. no username, no password) to CURLOPT_USERPWD, but did not do the same when the username is explicitly set to an empty string. * dt/http-empty-auth: http: http.emptyauth should allow empty (not just NULL) usernames
2 parents 3cdd5d1 + 5275c30 commit c6400bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ static int http_options(const char *var, const char *value, void *cb)
372372

373373
static void init_curl_http_auth(CURL *result)
374374
{
375-
if (!http_auth.username) {
375+
if (!http_auth.username || !*http_auth.username) {
376376
if (curl_empty_auth)
377377
curl_easy_setopt(result, CURLOPT_USERPWD, ":");
378378
return;

0 commit comments

Comments
 (0)