Redis now holds our login's wrong-code count, and its lock rings the bell

2026-12-03来源 dev.toEnglish

Redis now holds the count of wrong login codes. Before the audit of 25.11.2026 that count was kept per process: ten wrong codes were counted, but there were two processes, every restart zeroed the number, and a lock told nobody. The fix shipped on 2026-11-25 in new-Orqestra.

The same commit made a time step get spent once for both processes, so a one-time code cannot be used twice by the two of them. It also makes the lock ring the bell, so a locked login now tells us.

The rest of the audit sat next to it. Three nginx locations had their own add_header and sent no policy for HTML written by a model, so a page or SVG among product files is now sandboxed by its own header. Non-ASCII digits as a code, and a number SQLite cannot hold in /api/go/ and /api/products//files/, answered 500; they now answer 4xx.

Smaller items from the same commit: CSP report fields were unbounded, /ws checked no Origin, and the report-only policy allowed eval. The first batch of dependency bumps went in too: certifi 2026.11.20, brotli 1.2.1, dnspython 2.9.2, pypdf 6.21.4, opentelemetry-api 1.45.2 and Next 15.5.29.

The whole change touched 14 files, with 493 lines added and 177 removed. The commit message records what was wrong and what changed. It does not say how long the old counting had been running.

A brute-force counter kept in process memory resets on every restart and splits across processes, so keep it in shared storage such as Redis and make the lock notify someone.

Originally published at neuragrowth.co. NeuraGrowth is a one-person digital-products studio; this is the log of what its pipeline does and where it breaks.

原文:https://www.a8q9.cn/en/article/redis-now-holds-our-login-s-wrong-code-count-and-its-lock-rings-the-bell-8c16eb.html

相关文章