mirror of
https://github.com/nestriness/nestri.git
synced 2026-09-24 03:28:18 +03:00
Two submissions arrived carrying `v=0.2.0` and nothing else. Flagged from the
channel, not caught by us.
The Windows arm of `open_in_browser` was `cmd /C start "" <url>`. `cmd.exe`
re-parses its own command line and treats `&` as a command separator; Rust's
`Command` quotes arguments for the MSVC C runtime convention, which `cmd` does
not honour. So the URL was cut at its first `&` -- which in ours falls
immediately after `v=` -- and the browser opened
https://doctor.nestri.io/?v=0.2.0
carrying nothing whatsoever. Reproduced exactly with the same mechanism in a
POSIX shell: `sh -c 'echo <url>'` unquoted prints precisely that prefix.
Every Windows user who pressed Enter lost their entire report, and lost it
silently -- the page returned 200 and thanked them. Windows is most of this
audience, so most of the data we would ever have collected was going to
disappear this way.
Now `rundll32 url.dll,FileProtocolHandler`, which hands the URL to the shell's
protocol handler with no command interpreter anywhere in the path, so nothing
re-parses it. `explorer.exe` also opens URLs and was rejected: it returns a
non-zero exit status even on success, which would make the caller believe it
had failed and fall through.
The relay now also refuses to thank anyone for a version-only arrival, since an
older binary keeps producing them and a URL pasted into a shell unquoted does
the same thing.
Version to 0.2.1.
26 lines
831 B
TOML
26 lines
831 B
TOML
[package]
|
|
name = "nesdoctor"
|
|
version = "0.2.1"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
|
|
[[bin]]
|
|
name = "nesdoctor"
|
|
path = "src/main.rs"
|
|
|
|
# Dependencies are deliberately few. This binary is handed to strangers and
|
|
# asked to be trusted with a look at their machine, so the dependency tree is
|
|
# part of the interface: a reviewer has to be able to read all of it. Anything
|
|
# that can be done with `std` is done with `std` -- the VDF parser and every
|
|
# platform probe shell out or read files rather than pulling a crate.
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
clap.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
|
|
# The one non-trivial dependency, and only for the throughput half of the
|
|
# network test. rustls rather than native-tls so there is no OpenSSL to find.
|
|
ureq = "3"
|