Skip to content

THRIFT-6049: Limit struct read/write recursion depth in Lua library#3554

Draft
Jens-G wants to merge 1 commit into
apache:masterfrom
Jens-G:lua-recursion-depth
Draft

THRIFT-6049: Limit struct read/write recursion depth in Lua library#3554
Jens-G wants to merge 1 commit into
apache:masterfrom
Jens-G:lua-recursion-depth

Conversation

@Jens-G
Copy link
Copy Markdown
Member

@Jens-G Jens-G commented May 28, 2026

Summary

  • Adds recursion depth counter to Lua protocol base class
  • Limit is 64; raises TProtocolException(DEPTH_LIMIT) when exceeded
  • Lua generator wraps struct read/write bodies with depth guard

Test plan

  • Unit tests in lib/lua/ cover depth allow/reject/restore

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Client: lua

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jens-G Jens-G requested review from fishy and mhlakhani as code owners May 28, 2026 11:46
@mergeable mergeable Bot added lua Pull requests that update Lua code compiler labels May 28, 2026
@Jens-G Jens-G marked this pull request as draft May 28, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler lua Pull requests that update Lua code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant