aboutsummaryrefslogtreecommitdiffstats
path: root/config/index.js.sample
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-12-02 13:45:56 -0700
committerAdam Soltys <[email protected]>2026-12-02 13:45:56 -0700
commitc3e2e37e9b0186814a5d9cc04b9c728427e4f0cd (patch)
tree5bce88760fac62b2b0d486e3a8537d73f3128d14 /config/index.js.sample
parenta07e326bc9dae4a3df02ce8f08cb4f71f094392e (diff)
downloadcoinos-server-c3e2e37e9b0186814a5d9cc04b9c728427e4f0cd.tar.gz
coinos-server-c3e2e37e9b0186814a5d9cc04b9c728427e4f0cd.zip
auth: lock PIN checks after ten wrong PINs in an hour
Every PIN check answered right or wrong with no per-account limit (POST /pin, the sends that require a PIN, and the settings update), so anyone holding a stolen session could try every 6-digit PIN from rotating IPs. checkPin() now counts wrong PINs per account in pinfail:<id>; after ten in an hour every PIN check fails, the right PIN included, until the hour is up. A missing PIN doesn't count, and the right PIN clears the count. POST /pin answers 429 while locked. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SSfVopM1ZzXKZmLYU
Diffstat (limited to 'config/index.js.sample')
0 files changed, 0 insertions, 0 deletions