creds: mask OAuth bearer token in trace logs

Masked OAuth bearer tokens in credential trace output by emitting ***
when a bearer token is present, matching the existing password redaction
behavior and preventing sensitive token disclosure in verbose/debug
logs.

Closes #21659
This commit is contained in:
Shintomon Mathew 2026-05-18 19:32:45 +05:30 committed by Daniel Stenberg
parent b190c803e3
commit 38cd720f76
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -181,7 +181,7 @@ void Curl_creds_trace(struct Curl_easy *data, struct Curl_creds *creds,
Curl_creds_user(creds),
Curl_creds_has_passwd(creds) ? "***" : "",
Curl_creds_sasl_authzid(creds),
Curl_creds_oauth_bearer(creds),
Curl_creds_has_oauth_bearer(creds) ? "***" : "",
creds->source);
}
else