[
https://issues.apache.org/jira/browse/SLING-13138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aswin Avinippillil Dhanan updated SLING-13138:
----------------------------------------------
Description:
Improve request parameter limit handling in ParameterMap.
This change updates parameter limit enforcement in two ways:
- The boundary check is changed from `size() == maxParameters` to
`size() >= maxParameters` for more defensive handling at the configured limit.
- An optional configuration is added to control behavior when the parameter
limit is exceeded.
With the default configuration, existing behavior is preserved and additional
parameters are ignored with a warning.
When the new configuration is enabled, an IllegalStateException is thrown
immediately when the configured parameter limit is exceeded.
Unit tests are included for both modes.
Pull request:
https://github.com/apache/sling-org-apache-sling-engine/pull/74
was:
Improve request parameter limit handling in ParameterMap.
This change updates parameter limit enforcement in two ways:
- The boundary check is changed from `size() == maxParameters` to
`size() >= maxParameters` for more defensive handling at the configured limit.
- An optional configuration is added to control behavior when the parameter
limit is exceeded.
With the default configuration, existing behavior is preserved and additional
parameters are ignored with a warning.
When the new configuration is enabled, an IllegalStateException is thrown
immediately when the configured parameter limit is exceeded.
Unit tests are included for both modes.
> Add configurable fail-fast behavior for request parameter limit handling
> ------------------------------------------------------------------------
>
> Key: SLING-13138
> URL: https://issues.apache.org/jira/browse/SLING-13138
> Project: Sling
> Issue Type: Improvement
> Components: Engine
> Reporter: Aswin Avinippillil Dhanan
> Priority: Minor
>
> Improve request parameter limit handling in ParameterMap.
> This change updates parameter limit enforcement in two ways:
> - The boundary check is changed from `size() == maxParameters` to
> `size() >= maxParameters` for more defensive handling at the configured limit.
> - An optional configuration is added to control behavior when the parameter
> limit is exceeded.
> With the default configuration, existing behavior is preserved and additional
> parameters are ignored with a warning.
> When the new configuration is enabled, an IllegalStateException is thrown
> immediately when the configured parameter limit is exceeded.
> Unit tests are included for both modes.
> Pull request:
> https://github.com/apache/sling-org-apache-sling-engine/pull/74
--
This message was sent by Atlassian Jira
(v8.20.10#820010)