Repository navigation
Commit 6fb1c43
fix: address bot review findings on #1274 — control-char injection, URL join, dead export
- `cli/cmd/link.ts`: sanitize workspace names (strip C0/C1 control bytes,
including ESC) before they reach the OSC 8 hyperlink wrapper — an
attacker/account-controlled workspace name containing its own
`\x1b]8;;` could otherwise prematurely close our hyperlink and open a
spoofed one with our trusted URL as inert visible prefix text.
(CodeRabbit + cubic)
- `cli/cmd/link.ts`: only emit the underline visual affordance when the
terminal is one we're reasonably confident renders OSC 8 (conservative
TERM_PROGRAM/VTE/Konsole/Windows Terminal allowlist) — SGR underline is
far more universally rendered than OSC 8 itself, so emitting it
unconditionally made names look clickable in terminals where they
weren't. (cubic)
- `cli/cmd/link.ts` + `workspace.tsx` + `workspace-sidebar.tsx`: build the
manage URL via real `URL` pathname/search/hash manipulation instead of
string-concatenating `toString()` — the dev-only
`ALTIMATE_WORKSPACE_WEB_URL` override can carry its own path/query, and
naive concatenation landed `/w/<id>` inside the query string instead of
the path. Fixed in all three occurrences of the same pattern, not just
the one CodeRabbit/cubic flagged in link.ts. (CodeRabbit + cubic)
- `workspace.tsx`: drop the `export` on `isSafeHttpUrl` — no external
importers; `link.ts` deliberately keeps its own private copy. (Kilo)
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JsVwcBQP6VUwqEej3vK2zG1 parent bb9e666 commit 6fb1c43
3 files changed
Lines changed: 89 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
45 | 95 | | |
46 | 96 | | |
47 | 97 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
53 | 106 | | |
54 | 107 | | |
| 108 | + | |
55 | 109 | | |
56 | 110 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 111 | + | |
61 | 112 | | |
62 | 113 | | |
63 | | - | |
| 114 | + | |
64 | 115 | | |
65 | 116 | | |
66 | 117 | | |
| |||
155 | 206 | | |
156 | 207 | | |
157 | 208 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 209 | + | |
161 | 210 | | |
162 | 211 | | |
163 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
72 | | - | |
| 71 | + | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
244 | 259 | | |
245 | 260 | | |
246 | 261 | | |
| |||
250 | 265 | | |
251 | 266 | | |
252 | 267 | | |
253 | | - | |
| 268 | + | |
254 | 269 | | |
255 | 270 | | |
256 | 271 | | |
| |||
563 | 578 | | |
564 | 579 | | |
565 | 580 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
571 | 587 | | |
572 | 588 | | |
573 | 589 | | |
| |||
0 commit comments