fix(logging): quote OAuth account field

Use strconv.Quote when embedding the OAuth account in debug logs so unexpected characters (e.g. quotes) can't break key=value parsing.
This commit is contained in:
Michael Velbaum
2025-12-28 15:32:54 +02:00
parent 0e4148b229
commit 79fbcb3ec4

View File

@@ -1655,7 +1655,7 @@ func formatOauthIdentity(auth *Auth, provider string, accountInfo string) string
if accountInfo == "" { if accountInfo == "" {
return strings.Join(parts, " ") return strings.Join(parts, " ")
} }
return strings.Join(parts, " ") + " account=\"" + accountInfo + "\"" return strings.Join(parts, " ") + " account=" + strconv.Quote(accountInfo)
} }
// InjectCredentials delegates per-provider HTTP request preparation when supported. // InjectCredentials delegates per-provider HTTP request preparation when supported.