[
https://issues.apache.org/jira/browse/WW-5840?focusedWorklogId=1053199&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1053199
]
ASF GitHub Bot logged work on WW-5840:
--------------------------------------
Author: ASF GitHub Bot
Created on: 07/Nov/26 09:16
Start Date: 07/Nov/26 09:16
Worklog Time Spent: 10m
Work Description: g0w6y opened a new pull request, #2116:
URL: https://github.com/apache/struts/pull/2116
Fixes [WW-5840](https://issues.apache.org/jira/browse/WW-5840)
`UploadedFile.getOriginalName()` returns the file name exactly as the client
sent it, including any directory part. The framework itself never uses that
value as a path (the stored temp file is always UUID-named), but the
replacement `ActionFileUploadInterceptor`/`UploadedFilesAware` API passes it
through unchanged, unlike the legacy pre-7.0 path which stripped it.
- Adds `UploadedFile#getSanitizedOriginalName()` (basename only), alongside
the existing raw accessor, with javadoc on both making the distinction explicit.
- Switches the showcase upload actions, which only ever use the name for
display, to the sanitised accessor.
**Verified:** `AbstractMultiPartRequestTest` gains a benign-marker test
proving the raw accessor is unsanitised and the new one is not. Full `core`:
3742/0 failures (`JakartaMultiPartRequestTest` 42/42,
`JakartaStreamMultiPartRequestTest` 43/43). `apps/showcase` changes are
mechanical 1-line accessor swaps with no test asserting the exact filename
string.
Issue Time Tracking
-------------------
Worklog Id: (was: 1053199)
Remaining Estimate: 0h
Time Spent: 10m
> Provide a path-stripped original file name for action-based file uploads
> ------------------------------------------------------------------------
>
> Key: WW-5840
> URL: https://issues.apache.org/jira/browse/WW-5840
> Project: Struts 2
> Issue Type: Improvement
> Components: Core
> Reporter: Lukasz Lenart
> Priority: Major
> Fix For: 7.6.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)