mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-23 06:48:47 +00:00
Fixed: Stopped redacting JSON after encountering nil values (#233)
This commit is contained in:
parent
acdbdedd5d
commit
a37d1f4aeb
@ -158,9 +158,11 @@ func filterJsonBody(bytes []byte) ([]byte, error) {
|
|||||||
|
|
||||||
func filterJsonMap(jsonMap map[string] interface{}) {
|
func filterJsonMap(jsonMap map[string] interface{}) {
|
||||||
for key, value := range jsonMap {
|
for key, value := range jsonMap {
|
||||||
|
// Do not replace nil values with maskedFieldPlaceholderValue
|
||||||
if value == nil {
|
if value == nil {
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
nestedMap, isNested := value.(map[string] interface{})
|
nestedMap, isNested := value.(map[string] interface{})
|
||||||
if isNested {
|
if isNested {
|
||||||
filterJsonMap(nestedMap)
|
filterJsonMap(nestedMap)
|
||||||
|
Loading…
Reference in New Issue
Block a user