mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
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:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user