Commit c46615a
fix: validate custom install path in install.sh to prevent path traversal
User-supplied custom path was passed directly to mkdir -p and cp -r without
sanitization, allowing path traversal via .. segments or shell metacharacters.
Added validation to reject traversal sequences, restrict to safe characters,
and canonicalize via realpath before use.
Co-Authored-By: Claude Code <noreply@anthropic.com>1 parent 7a95d94 commit c46615a
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| |||
0 commit comments