Fixed: Stopped redacting JSON after encountering nil values (#233)

This commit is contained in:
Nimrod Gilboa Markevich
2021-08-19 10:59:13 +03:00
committed by GitHub
parent acdbdedd5d
commit a37d1f4aeb

View File

@@ -158,9 +158,11 @@ func filterJsonBody(bytes []byte) ([]byte, error) {
func filterJsonMap(jsonMap map[string] interface{}) {
for key, value := range jsonMap {
// Do not replace nil values with maskedFieldPlaceholderValue
if value == nil {
return
continue
}
nestedMap, isNested := value.(map[string] interface{})
if isNested {
filterJsonMap(nestedMap)