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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)