Repository navigation
A security release, an hour after 0.1.0. If you cloned 0.1.0, take this
instead.
What was wrong
The article reader takes a story id rather than a URL, precisely so that it
cannot be pointed at an arbitrary address. It looked the URL up, validated
it — and then handed it to a fetch that followed redirects on its own. So
the address that was checked and the address that was fetched were not
required to be the same one. A publisher in the news feed, or anyone who
could get a link into it, could answer with
302 Location: http://127.0.0.1:8900/api/screen
and the terminal would fetch its own API, or anything else reachable from
your machine, and render the result in the reader.
The guard now runs on every hop, and the chain is cut at five.
Two more from the same sweep:
- The blocked-address check was a regex over the text of the hostname, so
127.0.0.1was blocked while2130706433,0177.0.0.1,127.1and
[::ffff:127.0.0.1]— the same machine, differently spelled — were not,
and0.0.0.0, IPv6 link-local and unique-local, and the 100.64/10 carrier
range were never listed. It now asksipaddress, resolves names, checks
every address a name stands for, and fails closed on a name that will not
resolve. - The SEC user-agent, which carries the contact address you put in your own
config, was selected withendswith("sec.gov")— a string that also
matchesnotsec.gov.
Found by CodeQL, which was switched on in the same session. tests/test_article.py
holds the whole table plus the three redirect cases, and fails nine ways
against 0.1.0.
Also in this release
CodeQL on both languages, ruff in CI against a pinned version, the live
news and article suites added to the matrix, and the community health files
— a SECURITY.md with the actual threat model, a code of conduct, issue forms
and a PR checklist. Plus two visible fixes: the header still said
PILOT MARKETS, and the index strip's clock stretched across the futures
strip because its CSS rule had lost its declaration block.
Full notes: CHANGELOG.md.