From 7f7e4e3e689fd7ae36a690a041fe0e1c5a2ed6d2 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Wed, 13 May 2026 14:45:35 +0200 Subject: [PATCH] creds: create on service name only 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index ff1a9fd450..287aa584fa 100644 --- 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],