mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
f644ea54e2
Add configurable limits to the JSON plugin to prevent denial-of-service attacks via malicious JSON payloads. Limits are enforced directly in the existing JSONReader class without breaking backward compatibility (no interface extraction or class renames). New configurable constants (struts-plugin.xml defaults): - struts.json.maxElements (10000) - per-container element count - struts.json.maxDepth (64) - maximum nesting depth - struts.json.maxLength (2097152) - maximum input length in chars - struts.json.maxStringLength (262144) - maximum string value length - struts.json.maxKeyLength (512) - maximum object key length Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Struts 2 JFreeChart plugin
The JSON plugin provides a json result type that serializes actions into JSON. You will find more details in documentation.
Installation
Just drop this plugin JAR into WEB-INF/lib folder or add it as a Maven dependency.