Skip to content

Commit

Permalink
Prevent injected newlines in logs (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-boaz-trimble committed Jul 1, 2024
1 parent 070e916 commit ac36b4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/vaulthelper/kv/Modifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ func (m *Modifier) AdjustValue(path string, data map[string]interface{}, n int,
// Convert from stored string value to int
oldValue, err := strconv.Atoi(oldData[metricsKey].(string))
if err != nil {
logger.Printf("Could not convert value to int at: " + metricsKey)
logger.Printf("Could not convert value to int at: " + strings.ReplaceAll(metricsKey, "\n", ""))
continue
}
newValue := strconv.Itoa(oldValue + n)
Expand Down

0 comments on commit ac36b4c

Please sign in to comment.