Jordan Harband
6d870d182c
[Fix] nvm_download: avoid eval so mirror-supplied version strings can't inject commands
...
`nvm_download` built a curl/wget command string and ran it with `eval`.
The download URLs embed the version string taken from the mirror's `index.tab`,
which is untrusted.
Wrapping each argument in double quotes inside the `eval` does not prevent command substitution,
so a version field such as `v1$(touch /tmp/proof)` was executed by the shell.
This bypassed the earlier quoting hardening in 0ce8f5a .
Pass every argument as a literal argv element instead of constructing a string for `eval`,
on both the curl and wget paths,
so URL arguments are never re-parsed by the shell.
The wget flag translation is now done per-argument with a POSIX
`set --` loop rather than `sed` over the joined string.
The auth header is sanitized and added once,
before invoking the downloader.
2026-06-02 17:41:44 -07:00
..
2024-10-31 14:23:36 -07:00
2026-04-23 17:16:32 +03:00
2026-04-23 17:16:32 +03:00
2026-04-23 17:16:32 +03:00
2026-03-13 16:13:19 -04:00
2026-01-26 21:41:57 -08:00
2026-03-14 09:38:04 -07:00
2026-01-26 21:41:57 -08:00
2026-01-27 10:31:07 -08:00
2026-05-15 23:08:37 -07:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-03-13 15:26:07 -04:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2016-11-14 12:28:41 +08:00
2026-01-26 21:41:57 -08:00
2026-03-13 15:26:07 -04:00
2026-03-13 15:26:07 -04:00
2026-01-26 21:41:57 -08:00
2017-06-10 15:25:26 +08:00
2017-06-10 15:25:26 +08:00
2026-03-13 15:26:07 -04:00
2026-06-03 13:12:31 -07:00
2026-06-02 17:41:44 -07:00
2026-06-02 17:40:50 -07:00
2026-01-26 21:41:57 -08:00
2026-03-14 14:30:31 -07:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-03-14 12:53:14 -07:00
2026-03-24 12:44:21 -07:00
2026-01-26 21:41:57 -08:00
2026-03-13 15:26:07 -04:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-03-13 15:26:07 -04:00
2026-03-13 15:26:07 -04:00
2026-03-14 09:40:43 -07:00
2026-01-26 21:41:57 -08:00
2026-01-27 10:31:07 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-03-24 12:44:21 -07:00
2026-03-13 15:26:07 -04:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-03-24 12:44:21 -07:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-03-13 15:26:07 -04:00
2026-01-26 21:41:57 -08:00
2026-03-13 15:26:07 -04:00
2026-03-13 15:26:07 -04:00
2026-03-13 15:26:07 -04:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-03-13 16:13:19 -04:00
2026-03-13 15:26:07 -04:00
2026-01-26 21:41:57 -08:00
2026-03-13 15:26:07 -04:00
2026-03-13 15:26:07 -04:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-03-13 15:26:07 -04:00
2026-03-13 15:26:07 -04:00
2026-03-13 15:26:07 -04:00
2026-03-14 09:39:20 -07:00
2026-01-27 10:31:07 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-03-13 15:26:07 -04:00
2026-03-13 15:26:07 -04:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2022-10-13 20:16:42 -07:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-26 21:41:57 -08:00
2026-01-09 11:30:14 +09:00