Repository navigation
v3.31.0 — Security & infra hardening 🔒
Release date: 8 November 2026
Type: Security, infra and fixes (backend, frontend, nginx, VPS). Issues #429, #434, #437, #441, #446, #448, #453, #455, #456, #458, #460, #462 (closed).
PRs: #430 · #435 · #438 · #445 · #449 · #451 · #452 · #454 · #461 · #463 · #465 · #466 · #467 · follows v3.30.2
Two weeks of closing gaps rather than adding features. They range from patched dependencies and rate-limited logins to a production server whose config now lives in git, gets tested in CI and is checked again before every deploy. Every infra change was verified live on the server after its deploy.
What's New
- Dependency patches. Next.js 16.4.3 fixes a critical remote code execution vulnerability.
@sentry/nextjs10.76.2 fixes a tunnel-route middleware bypass.follow-redirectsandbody-parserare patched. - Login rate limits. 20 per hour per IP and 10 per hour per email. Both are checked before the user lookup, so a blocked attempt costs no database work and reveals nothing about which accounts exist.
/api/discordlocked down. It used to forward any text to Discord. It now takes 4 allowlisted events, and notifications that carry an email come from the backend.- Backend port closed. Port 4000 was public, because Docker ports bypass ufw. Only nginx's 80 and 443 are open now.
- Container logs capped at 3 × 10 MB per container.
- Monitor without false alarms. Container and readiness alerts fire only after 2 failures in a row, and send a recovery message. The script is tracked and tested in CI.
- nginx config in git. It is tested in CI against stub upstreams, and checked with
nginx -tusing the real certificates before each deploy. Requests to the bare IP or an unknown host get no reply. - One CORS owner.
/graphqlsentAccess-Control-Allow-Origintwice. Express now owns CORS. - HTTP/2 and gzip. The
/graphqlarticles response drops from 4,322 to 2,041 bytes, and/articlesLighthouse goes from 88 to 97. - Login notifications back, sent from the backend for successful logins only. zod 4 on the frontend, with form errors still working.
Before / After
| Before | After | |
|---|---|---|
| Backend port 4000 | Open, scanned | Closed |
| Login attempts | Unlimited | 20/h per IP, 10/h per email |
/api/discord |
Any text | 4 allowlisted events |
| nginx config | Only on the server | In git, tested, validated before deploy |
| Bare-IP request | Redirected to the site | No reply |
| Container alerts | Random false "Down" | 2 failures in a row, then recovery |
/graphql CORS origin header |
Sent twice | Sent once |
| Protocol | HTTP/1.1 | HTTP/2 |
Lighthouse /articles (mobile, median of 3) |
88 | 97 |
Docs
- Release notes:
_docs/releaseNotes/v.3.31.0_Security-Infra-Hardening.md