Commit Graph
1 Commits
Author SHA1 Message Date
@aaronjmarsandGitHub 87880d25a4 fix(ui): sanitize terminal escape sequences in result detail view (#44)
The detail pane renders `infoHash` and `magnet` verbatim, whereas the
result name is passed through `cleanText()`. A malicious or hijacked
indexer can embed control bytes — e.g. an OSC-52 clipboard-write
sequence — in a magnet or info hash; those bytes are then written to the
terminal when the user opens that result's detail pane.

Add `stripControl()` (removes C0/C1 controls and DEL) and apply it to
both fields at render. Unlike `cleanText()`, it preserves the exact
remaining characters — no whitespace folding, NFC, or "Untitled"
fallback — which is correct for identifiers and URLs.
2026-07-05 10:00:10 -04:00