[
https://issues.apache.org/jira/browse/WW-5752?focusedWorklogId=1045186&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1045186
]
ASF GitHub Bot logged work on WW-5752:
--------------------------------------
Author: ASF GitHub Bot
Created on: 01/Oct/26 15:23
Start Date: 01/Oct/26 15:23
Worklog Time Spent: 10m
Work Description: g0w6y opened a new pull request, #1982:
URL: https://github.com/apache/struts/pull/1982
Fixes [WW-5752](https://issues.apache.org/jira/browse/WW-5752)
Request-derived strings were logged unchanged, so a decoded line break (for
example `%0a` in a URL path, parameter name or `request_locale`) produced
forged log lines. This applies `normalizeSpace`, as `TokenHelper`, the
multipart classes and `ParametersInterceptor` already do.
- `DefaultActionMapper`, `RestfulActionMapper`: rejected namespace, action
and method names
- `ParametersInterceptor`: rejected parameter names and values
- `DefaultLocaleProvider`: invalid locale; the exception is no longer
attached because its message repeats the raw value
- `JSONInterceptor`: rejected JSON keys and values
- `DefaultCspReportAction`: report body
- `TokenHelper`: unknown token name
Each change has a regression test that fails without it. `LogCapture` is a
small test helper.
Issue Time Tracking
-------------------
Worklog Id: (was: 1045186)
Remaining Estimate: 0h
Time Spent: 10m
> Normalize request-derived values in log messages
> -------------------------------------------------
>
> Key: WW-5752
> URL: https://issues.apache.org/jira/browse/WW-5752
> Project: Struts 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 7.3.0
> Reporter: Gouri Sankar A
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Request-derived strings are logged unchanged at WARN level in several places,
> so a decoded line break (for example in a URL path, a parameter name, a
> request_locale value or a JSON key) produces forged log lines.
> Affected classes: DefaultActionMapper, RestfulActionMapper,
> ParametersInterceptor, DefaultLocaleProvider, JSONInterceptor,
> DefaultCspReportAction, TokenHelper.
> Proposed: apply StringUtils.normalizeSpace to these values, as TokenHelper,
> the multipart classes and ParametersInterceptor already do.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)