Repository navigation
fix(springboot): validate trailing slash redirect target - #3098
Conversation
348b08b to
0a6c71e
Compare
Backported commit 5f12e717c13fa4b8638b758f7c2f345b16dd67d6 from the OrqueIO repository. Original author: Shaymabenahmed-tech <[email protected]> Source: OrqueIO/OrqueIO@5f12e71 Change unit: 4854
|
Context for this change: the trailing-slash filter is still needed for the registered webapp entry paths ( The redirect target validation is a small defensive hardening around that compatibility filter: only local absolute request paths are reflected into the |
0a6c71e to
4a497fc
Compare
|
|
Thank you for the clarification |
Backported commit 5f12e717c13fa4b8638b758f7c2f345b16dd67d6 from the OrqueIO repository. Original author: Shaymabenahmed-tech <[email protected]> Source: OrqueIO/OrqueIO@5f12e71 Change unit: 4854 (cherry picked from commit 3c64587)
|
Cherry-picked for 2.1.2 |



Summary
AppendTrailingSlashFilter.4854/operaton/app.Reviewer Notes
Previously,
AppendTrailingSlashFilterusedrequest.getRequestURI()directly as the redirect target after appending/. If a servlet container or proxy exposed a non-local URI here, the filter could emit an external redirect. This change only redirects local paths and rejects values such ashttps://example.org/appand//example.org/app, while preserving the intended Spring Boot 2-style trailing-slash behavior for normal Operaton app routes.No original OrqueIO PR was recorded for this change unit; the source attribution is the commit above.
Tests
.devenv/scripts/maintenance/code-cleanup.shgit diff --check./mvnw -pl spring-boot-starter/starter-webapp-core -Dtest=AppendTrailingSlashFilterTest -Dskip.frontend.build=true test