You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 51ec070
Browse filesBrowse the repository at this point in the historyBrowse files
Stop json/plain from allocating arbitrary classes (0.0.7)
Oj object mode can allocate any Ruby class named in a json/plain payload.
Allowlist what may round-trip, reject duplicate object keys and excessive
nesting, then Oj.load the original bytes so existing encoded history still
works. Encoding name stays json/plain.
Runtime depends on google-protobuf ~> 3.25. CI now runs on transfers-master.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,15 @@
1
1
# Changelog
2
2
3
+
## 0.0.7
4
+
5
+
-`json/plain` no longer builds arbitrary Ruby classes from encoded payloads. That was possible because Oj object mode can allocate any constant named in the payload.
6
+
- Still round-trips first-party shapes: activity `Request` / `Response`, `Temporal::` types, Exception subclasses (including backtraces), `Date` / `DateTime` / `Rational`, anonymous Structs, and classes registered with `Temporal::JSON.allow_class`.
7
+
- Rejects duplicate JSON object keys. Oj and `JSON.parse` disagree on duplicates, so a discarded value could still allocate a class.
8
+
- Rejects constants that are only pending `autoload` until they are actually loaded.
9
+
- Rejects JSON nested deeper than 512 levels.
10
+
- Encoding name stays `json/plain`.
11
+
- Runtime depends on `google-protobuf`~> 3.25 (generated stubs under `lib/gen/` require protobuf 3).
0 commit comments