You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Jens-G (via GitHub)" <gi...@apache.org> on 2026/05/28 11:46:13 UTC
[PR] THRIFT-6046: Limit struct read/write recursion depth in JavaScript library [thrift]
Jens-G opened a new pull request, #3551:
URL: https://github.com/apache/thrift/pull/3551
## Summary
- Adds `incrementRecursionDepth()` / `decrementRecursionDepth()` to `Thrift.Protocol` in `lib/js/src/thrift.js`
- Same methods added to Node.js binary, compact and JSON protocol implementations in `lib/nodejs/lib/thrift/`
- Limit is `Thrift.DEFAULT_RECURSION_DEPTH` (64); throws `TProtocolException(DEPTH_LIMIT)` when exceeded
- JS generator emits calls around every generated `read` / `write` struct method
## Test plan
- [ ] `lib/js/test/test-skip-depth.js` — QUnit tests for allow/reject/restore
- [ ] `lib/nodejs/test/recursion_depth.test.js` — Node.js tests via `npm test`
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] THRIFT-6046: Limit struct read/write recursion depth in JavaScript library [thrift]
Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G merged PR #3551:
URL: https://github.com/apache/thrift/pull/3551
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org