Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ebpftracer/l7/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package l7
import (
"bytes"
"encoding/base64"
"log"
"regexp"
"strings"
)
Expand Down Expand Up @@ -66,7 +67,9 @@ func SanitizeString(input string) string {
for _, pattern := range sensitivePatterns {
sanitized = pattern.ReplaceAllStringFunc(sanitized, func(match string) string {
// Only replace the sensitive part, keeping the structure intact
return strings.Repeat("*", len(match))
sanitized_string := strings.Repeat("*", len(match))
log.Printf("Replacing %s with %s , using pattern %s", match, sanitized_string, pattern)
return sanitized_string
})
}

Expand Down