mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16:44 +00:00
Merge pull request #48 from roseteromeo56/alert-autofix-6
Potential fix for code scanning alert no. 6: Clear-text logging of sensitive information
This commit is contained in:
commit
1fcff0c03d
1 changed files with 2 additions and 0 deletions
|
|
@ -1096,10 +1096,12 @@ func GenDoc(ctx *cli.Context) error {
|
||||||
for i := range req.Messages {
|
for i := range req.Messages {
|
||||||
req.Messages[i].Value = "[REDACTED]" // Obfuscate message content
|
req.Messages[i].Value = "[REDACTED]" // Obfuscate message content
|
||||||
}
|
}
|
||||||
|
req.Meta = core.Metadata{} // Clear metadata to avoid leaking sensitive information
|
||||||
case *core.ListRequest:
|
case *core.ListRequest:
|
||||||
for i := range req.Accounts {
|
for i := range req.Accounts {
|
||||||
req.Accounts[i].URL.Path = "[REDACTED]" // Obfuscate account paths
|
req.Accounts[i].URL.Path = "[REDACTED]" // Obfuscate account paths
|
||||||
}
|
}
|
||||||
|
req.Meta = core.Metadata{} // Clear metadata to avoid leaking sensitive information
|
||||||
}
|
}
|
||||||
if data, err := json.MarshalIndent(v, "", " "); err == nil {
|
if data, err := json.MarshalIndent(v, "", " "); err == nil {
|
||||||
output = append(output, fmt.Sprintf("### %s\n\n%s\n\nExample:\n```json\n%s\n```", name, desc, data))
|
output = append(output, fmt.Sprintf("### %s\n\n%s\n\nExample:\n```json\n%s\n```", name, desc, data))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue