]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
creds: create on service name only
authorStefan Eissing <stefan@eissing.org>
Wed, 13 May 2026 12:45:35 +0000 (14:45 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 13 May 2026 14:37:15 +0000 (16:37 +0200)
Fix creation of creds object for transfer when only a sasl service
name is configured by the application.

Follow-up to 5e99b73cf441d9c369768

Closes #21591

lib/url.c

index ff1a9fd4505e32a5a9c2057dc650c86ee72a95d5..287aa584fa100142b33d326394aa20aba336e64a 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1436,8 +1436,9 @@ static CURLcode url_set_data_creds(struct Curl_easy *data,
   Curl_creds_unlink(&data->state.creds);
   if((data->set.str[STRING_USERNAME] ||
       data->set.str[STRING_PASSWORD] ||
+      data->set.str[STRING_BEARER] ||
       data->set.str[STRING_SASL_AUTHZID] ||
-      data->set.str[STRING_BEARER]) &&
+      data->set.str[STRING_SERVICE_NAME]) &&
      (data->set.allow_auth_to_other_hosts ||
       Curl_peer_same_destination(data->state.initial_origin, conn->origin))) {
     result = Curl_creds_create(data->set.str[STRING_USERNAME],