[
https://issues.apache.org/jira/browse/THRIFT-6286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jens Geyer resolved THRIFT-6286.
--------------------------------
Fix Version/s: 0.25.0
Assignee: Jens Geyer
Resolution: Fixed
> Go: TConfiguration has no container-size limit
> ----------------------------------------------
>
> Key: THRIFT-6286
> URL: https://issues.apache.org/jira/browse/THRIFT-6286
> Project: Thrift
> Issue Type: Improvement
> Components: Go - Library
> Reporter: Jens Geyer
> Assignee: Jens Geyer
> Priority: Minor
> Fix For: 0.25.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Go's {{TConfiguration}} ({{lib/go/thrift/configuration.go}}) exposes
> {{MaxMessageSize}}, {{MaxFrameSize}} and the recursion limit, but no limit on
> a container's declared element count. The C++ ({{container_limit_}}), Java
> ({{containerLengthLimit_}}) and D ({{containerSizeLimit}}) bindings each
> expose such a knob. A Go caller that wants to bound the element count a
> decoder accepts before it sizes a collection has no equivalent setting.
> h2. Suggested
> Add a container-size limit to {{TConfiguration}} and consult it where a
> container's declared element count is read, following the shape the other
> bindings use. It is a public API addition, so it belongs in normal review.
> _Drafted with AI assistance (Claude Opus 4.8); reviewed and filed by Jens
> Geyer._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)