You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens-G (via GitHub)" <gi...@apache.org> on 2026/05/19 23:15:11 UTC

[PR] THRIFT-6014: Add recursion depth limit to skip() in JavaScript library [thrift]

Jens-G opened a new pull request, #3500:
URL: https://github.com/apache/thrift/pull/3500

   ## Summary
   
   - Adds a `depth` parameter to `Thrift.Protocol.prototype.skip` in `lib/js/src/thrift.js`
   - Throws `TProtocolException` with `DEPTH_LIMIT` when depth exceeds 64
   - Aligns the browser library with the Node.js protocols (binary, compact, JSON in `lib/nodejs/`) which already enforce this limit
   - Adds a QUnit test file (`test-skip-depth.js`) and corresponding HTML harness covering the limit boundary
   
   ## Test plan
   
   - [ ] `lib/js/test/test-skip-depth.html` — new tests: throws `DEPTH_LIMIT` when called at depth 64 (increments to 65), no throw at depth 63 for a leaf type
   - [ ] Existing JavaScript tests continue to pass
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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: dev-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] THRIFT-6014: Add recursion depth limit to skip() in JavaScript library [thrift]

Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G merged PR #3500:
URL: https://github.com/apache/thrift/pull/3500


-- 
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: dev-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org