Repository navigation
Commit 9439c19
Fix http-streaming upload example: restore file writes broken by Camel's jailStartingDirectory hardening
Camel 4.23 hardened the file component's jailStartingDirectory containment
check to unconditionally reject any starting directory whose compacted path
still begins with "..", which is always true for the upload backend's
`file:../client` endpoint. This made the upload scenario throw
IllegalArgumentException on every request while the download scenario
(which reads via plain java.io.File) kept working.
Disable the check on this specific endpoint via jailStartingDirectory=false,
since the target file name is a hardcoded constant and not derived from
exchange/header data, so there is nothing here for the guard to protect
against. Document the reasoning and the security trade-off in the example's
README so it isn't copied blindly into routes with dynamic file names.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7ZfDGqU16yJFWuGogJ3Ju1 parent 96a05b8 commit 9439c19
2 files changed
Lines changed: 23 additions & 1 deletion
File tree
- http-streaming
- upload/backend-server/src/main/java/org/apache/camel/springboot/example/http/streaming
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
54 | 76 | | |
55 | 77 | | |
56 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments