Poor UX when missing curly brackets in torrc's ExitNodes setting
Summary
/etc/tor/torrc with a line like ExitNodes us
instead of ExitNodes {us}
is accepted, but fails to bootstrap.
Steps to reproduce:
- Edit torrc file: add
ExitNodes
with invalid syntax (omitted curly brackets) - Start or reload Tor
- Try to use it.
What is the current bug behavior?
It starts, sticks at 0% bootstrapping (or logs Our directory information is no longer up-to-date enough to build circuits: We need more microdescriptors: we have 7057/7057, and can only build 0% of likely paths. (We have 100% of guards bw, 100% of midpoint bw, and 0% of exit bw = 0% of path bw.)
if reloaded), does not work.
What is the expected behavior?
Tor refuses to read torrc file as invalid, showing the line number of ExitNodes directive, ideally also recongnizing and explaining the mistake.
Alternatively, the bracket-less syntax is considered valid and working and Tor works normally and a line like ExitNodes us
is applied, just like ExitNodes {us}
.
Environment
- Which version of Tor are you using? Run
tor --version
to get the version if you are unsure.
Tor version 0.4.7.7.
Tor is running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1k, Zlib 1.2.11, Liblzma 5.2.5, Libzstd 1.4.8 and Glibc 2.31 as libc.
Tor compiled with GCC version 10.2.1
- Which operating system are you using? Debian GNU/Linux Bullseye on x86_64.
- Which installation method did you use? Distribution package from bullseye-backports.
Edited by vi