🚀 reddont 0.1.17
A security release: sign-in, OIDC account linking, cookies and invites are all harder to abuse.
✨ What's new
- Failed sign-in limits. After 10 failed password sign-ins for one username from one address, or 30 from one address, within 15 minutes, sign-ins from that address wait out the 15 minutes, even with the right password. An IPv6 address counts by its /56. Each failure is logged as a warning naming the username and address, for fail2ban and similar tools. #102
🔄 Changed
__Host-cookies over HTTPS. The session, CSRF and OIDC cookies now take the__Host-prefix, so a site on another subdomain of your domain can't set them to sign you in to an account it controls. #102- Forwarded headers count only from a trusted proxy.
REVERSE_PROXY_WHITELISTnow applies in every login mode. Without it, OIDC and header login trust only loopback and private-network addresses, no longer whoever connects. #102 - OIDC usernames. A username comes from
emailonly when the provider marks the address verified, and never from the display name (name). Claims in the signed ID token take precedence over userinfo. #102 - Deleting an invite is a button. It's now a form with a CSRF token, not a link. Administrators can delete any invite. Someone who lost the administrator role can still see and delete the invites they created. #103
🛠️ Fixes
- OIDC account takeover. A new OIDC identity with the same username as an account linked to another identity took that account over. It's now refused. #102
- Invite deletion. Any signed-in account could delete any invite. Only administrators and the invite's creator can now. #103
- Session key without
JWT_SECRET_KEY. It came fromMath.random(). It's now 256 random bits from a secure generator, and startup warns that sessions end on restart. Invite tokens are now 128 random bits, not 40. #103 - Page messages from links.
/loginand the dashboard showed any text given in?message=. They now show only reddont's own messages. #102 - Invite times away from UTC. With
TZset, a new invite could show as made hours in the future, such as-17998s ago. #103
📦 Under the hood
- Coverage. JavaScript line coverage is 98.36%, with all 470 tests passing and none skipped. #103
⚠️ Before you upgrade
- Update the image to
ghcr.io/voc0der/reddont:0.1.17, or follow:latest. - Everyone signs in again once over HTTPS, because the cookies have new names. OIDC users go straight back in through the provider.
- Behind a reverse proxy, set
REVERSE_PROXY_WHITELISTto the proxy's address in any login mode. Then the rate limit and the new sign-in limits count each client, not the proxy. - Set
JWT_SECRET_KEYto a long random value, such as the output ofopenssl rand -hex 32, if you haven't. Without it, startup now logs a warning, and sessions end at every restart, as before. - On its first start, 0.1.17 adds an invite creator column to the database. Existing invites have none, so only administrators can delete them.
Full Changelog: v0.1.16...v0.1.17
Release contributors: @voc0der