Preserve opaque JSON keys independently of field write guards
This commit is contained in:
@@ -95,8 +95,8 @@ func modelJSONSafe(value any, depth int) bool {
|
||||
}
|
||||
return true
|
||||
case map[string]any:
|
||||
for key, item := range value {
|
||||
if canvasChoice(key, "__proto__", "constructor", "prototype") || !modelJSONSafe(item, depth+1) {
|
||||
for _, item := range value {
|
||||
if !modelJSONSafe(item, depth+1) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user