cloudflare / cloudflare/workerd
Recursively freeze JSON bindings/modules
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
workerd should [`recursivelyFreeze`](https://github.com/cloudflare/workerd/blob/d46550a36dfd1974135b52189ad8619a3cdbb53a/src/workerd/jsg/util.h#L195-L201) JSON data parsed directly from its config. In my mind, these values are application-wide configuration, the mutation of which when handling a request has the potential to result in subtle but serious bugs. It may not be obvious to developers in shared codebases that an object/array they're dealing with is ultimately a perhaps deeply-nested property of a global mutable object. I have unfortunately seen it happen before 🌞.
But of course this would be a breaking change.
Contributor guide
Assessment
This issue has not been assessed yet.