Skip to content

Invalid#11025

Closed
DragonFSKY wants to merge 2 commits into
spring-projects:mainfrom
DragonFSKY:fix/10964-zip-transformer-work-directory
Closed

Invalid#11025
DragonFSKY wants to merge 2 commits into
spring-projects:mainfrom
DragonFSKY:fix/10964-zip-transformer-work-directory

Conversation

@DragonFSKY
Copy link
Copy Markdown
Contributor

@DragonFSKY DragonFSKY commented May 27, 2026

No description provided.

A generated target zip file name can contain path segments such as "../".
For FILE results, ZipTransformer resolves that name against workDirectory
and writes the zip file there, which allows the output file to be created
outside the configured work directory.

Add an opt-in keepWorkingDirectory flag to reject target zip file names
whose canonical path is outside workDirectory. Keep the default false to
preserve existing behavior for applications that rely on the current path
handling.

Also expose the option in the XML namespace and cover the default behavior,
valid in-directory output, and rejected traversal attempts with tests.

Fixes: spring-projectsgh-10964
Signed-off-by: Dongliang Xie <dragonfsky@gmail.com>
Document the new ZipTransformer keepWorkingDirectory option in the zip
reference and add it to the 7.1 what's-new section.

Signed-off-by: Dongliang Xie <dragonfsky@gmail.com>
@DragonFSKY DragonFSKY force-pushed the fix/10964-zip-transformer-work-directory branch from 0c35c38 to b831412 Compare May 27, 2026 07:50
@cppwfs
Copy link
Copy Markdown
Contributor

cppwfs commented May 27, 2026

Thank you for your contribution! I've been revisiting the original issue, and it is a bit vague. For now, I'm closing it so we can better articulate how EIP should handle this scenario.
We value all contributions and appreciate the work you have done on this.

@cppwfs cppwfs closed this May 27, 2026
@artembilan artembilan changed the title GH-10964: Add keepWorkingDirectory to ZipTransformer Invalid May 27, 2026
@spring-projects spring-projects locked as off-topic and limited conversation to collaborators May 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants