- Rename the Go module from codeberg.org/squidd/parsimony to
git.kmalloc.org/squid/parsimony in go.mod and every import.
- Fix .gitignore: the bare `parsimony` pattern also ignored the cmd/parsimony
folder, so the main package was never committed and a clean checkout could
not be built. Anchor it to the root (`/parsimony`) and add cmd/parsimony.
a@127.0.0.1 has dots and digit labels, so it passed the domain check
and named the daemon's own host without brackets. No top-level domain
is all digits: a domain whose last label is all digits is refused.
mail.ParseAddress already refuses empty labels such as x..com, so the
form-level tests could not see the empty-label check in publicDomain.
A direct table test pins the rule on its own.
root@localhost, a@b and a@[127.0.0.1] passed mail.ParseAddress, so the
public form could make the daemon mail itself or its own network.
The domain of a typed address must now contain a dot, not be a domain
literal, be made of non-empty labels of letters, digits and hyphens, and
not be localhost or end in .localhost, .local, .internal or .invalid.
.test and .example stay accepted (the end-to-end tests use them).
Behind a reverse proxy every visitor shared the proxy's address, so the
whole site got 10 signups an hour and one person could block everyone.
Over IPv6 each address of a /64 was a fresh key, so the limit did not
bind and the map grew by one entry per address.
- web.trusted_proxies (addresses or CIDR ranges, default empty) is
validated at load and passed to the web handler. X-Forwarded-For is
read only when the TCP peer is a trusted proxy; the client is then the
right-most entry that is not itself a trusted proxy. An empty or
malformed header falls back to the peer. With no trusted proxy the
behaviour is unchanged: the header is ignored.
- IPv6 clients are keyed by their /64, IPv4 clients by address.
- The limiter remembers at most 100000 clients. When full it sweeps
expired entries first and otherwise answers 429 to new clients until
the oldest window ends, instead of growing.
- the typed address is trimmed before it is used
- Retry-After rounds up to whole seconds
- the hour ends after exactly an hour, and the sweep forgets such an address
- found by mutation testing: these edges survived the first tests
- GET /subscribe/{address}: email field, an off-screen honeypot named website,
a Subscribe button; 404 (the usual page) for a private, closed or unknown list
- POST /subscribe/{address}: one plain ASCII address of at most 254 characters,
else the form again (400) with the escaped typed value; a filled honeypot gets
the success page and nothing happens; otherwise Router.RequestJoin and always
the same neutral page, so a member, a rate limited address or an unknown
one cannot be told apart; the body is limited to 4 KiB (413)
- at most 10 POSTs per hour per TCP peer address (X-Forwarded-For is ignored),
then 429 with Retry-After; idle addresses are swept; the clock is injectable
- a Subscribe link on the archive page of a list that qualifies, nothing else
- no-store on the subscribe pages; the CSP is unchanged
- tests for each of these, including escaping, enumeration, the limit and its expiry
- Show the mark on every page, linking to the index, inline so the CSP needs no image source
- Add the favicon as a data: URI and allow img-src data: only
- Add web.listen config (default 127.0.0.1:8081, empty disables)
- Start the public web in app, close it with the rest
- Add end-to-end test: archive stays private, becomes public, hides addresses, one-click unsubscribe works
- Cover mutation survivors: attachments, first text part, multibyte cap, member id 0, page clamp, API limit cap, closing connections
- Update OpenAPI, README and example config
- Add list index, paginated archive with search, and message pages with thread links
- Show only lists whose archive policy is public; hide others and foreign messages with 404
- Escape all content and obfuscate email addresses in subjects, senders and bodies
- Add GET confirm page and POST one-click unsubscribe with signed tokens
- Send CSP, nosniff, no-referrer and no-store headers