Commit Graph
2 Commits
Author SHA1 Message Date
Jordan Harband ad42d90860 [Fix] nvm_ls_remote_index_tab, nvm_compare_checksum: also keep non-ASCII controls from the mirror off the terminal
Rejecting only ASCII control characters in the LTS codename still lets through a UTF-8 C1 control
(like U+009B, a CSI) or a bidi override (like U+202E),
which some terminals act on.
A row is now kept only if its codename is `-`, empty, or alias-safe,
which is the same shape the LTS alias step already requires,
and every real codename has.

BusyBox `tr` mishandles `-c` with a character class,
so on Alpine the expected checksum printed as almost all `?`;
an octal range in the C locale works in BusyBox, GNU, and BSD `tr`,
and does not make BSD `tr` abort on invalid UTF-8.
2026-11-16 15:13:13 -08:00
kasparovabi f3ad1d23b7 [Fix] nvm_ls_remote_index_tab, nvm_compare_checksum: keep control characters from the mirror off the terminal
`index.tab` and `SHASUMS256.txt` are untrusted mirror metadata.
An LTS codename (`$10`) carrying ESC/BEL bytes was printed by `nvm ls-remote`,
and a mismatched expected checksum was echoed as received.

Skip `index.tab` rows whose codename has a control character,
next to the existing version check,
and show non-printable bytes of the expected checksum as `?`.
2026-11-12 14:28:16 +03:00