[
https://issues.apache.org/jira/browse/WW-5618?focusedWorklogId=1010711&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1010711
]
ASF GitHub Bot logged work on WW-5618:
--------------------------------------
Author: ASF GitHub Bot
Created on: 21/Mar/26 11:11
Start Date: 21/Mar/26 11:11
Worklog Time Spent: 10m
Work Description: lukaszlenart merged PR #1626:
URL: https://github.com/apache/struts/pull/1626
Issue Time Tracking
-------------------
Worklog Id: (was: 1010711)
Time Spent: 0.5h (was: 20m)
> Make JSON plugin more configurable
> ----------------------------------
>
> Key: WW-5618
> URL: https://issues.apache.org/jira/browse/WW-5618
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - JSON
> Reporter: Lukasz Lenart
> Assignee: Lukasz Lenart
> Priority: Minor
> Fix For: 6.9.0, 7.2.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The JSON plugin currently provides limited configuration options for
> controlling deserialization behavior. Other Struts components (e.g.,
> {{fileUpload}} interceptor) offer fine-grained, per-action configurable
> limits, but the JSON plugin has no equivalent controls.
> This ticket adds the following configurable options:
> - {{struts.json.maxElements}} — maximum number of elements in a single JSON
> array or object (default: 10,000)
> - {{struts.json.maxDepth}} — maximum nesting depth for JSON structures
> (default: 64)
> - {{struts.json.maxLength}} — maximum length of JSON input in characters
> (default: 2,097,152 / 2MB)
> - {{struts.json.maxStringLength}} — maximum length of an individual JSON
> string value (default: 262,144 / 256KB)
> - {{struts.json.maxKeyLength}} — maximum length of a JSON object key name
> (default: 512)
> These options should be:
> 1. Configurable globally via {{struts.xml}} constants
> 2. Overridable per-action via interceptor {{<param>}} elements (same pattern
> as {{fileUpload}})
> 3. Exposed through `JSONConstants` and {{JSONConstantConfig}}
> Additionally, {{JSONReader}} should be made injectable via the Struts
> Container (matching the existing {{JSONWriter}} pattern), allowing users to
> provide custom reader implementations.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)