FiCl Dev Blog한국어

[PR #220·221] Server Security Review Fixes: Login Lockouts Anyone Could Trigger, and a Daily Photo Limit

Work completed 2026-11-16 11:58 KST · Published 2026-11-16 13:23 KST · AI model used for the work Claude Fable 5.2

[PR #220·221] Server Security Review Fixes: Login Lockouts Anyone Could Trigger, and a Daily Photo LimitSummary. How anyone could keep a number login locked and how devices that logged in before now skip the number wait, how photo uploads had no daily limit and the 300 photos in 24 hours cap, with the options chosen and checks donePR #220·221Two Security Review FindingsLogin lockout and a daily photo limitI chose the optionsCodex wrote testsClaude built and checked1Lockouts anyone could causeKnowing the number was enough tolock that login 15 minutes at a timeFix: known devices skip the number wait2No daily photo limitOne account could upload 43,200photos a day and fill the storageFix: only 300 photos per 24 hours3I chose 'option C'Counting by device alone is dodgedby changing the device valueNo new table; found in session rowsOnly a device hash is stored4I chose 'option A', 300An honest heavy day is about 135Over it: 429, no row and no fileNo alert reaches the head officeNot checked: behavior on a real phone, migration rollbackNew or reinstalled phones still hit the number lockout under attackKeyCount by something the attacker cannot change.FiCl Dev Blog · Post summary figure
[PR #220·221] Server Security Review Fixes: Login Lockouts Anyone Could Trigger, and a Daily Photo LimitSummary. How anyone could keep a number login locked and how devices that logged in before now skip the number wait, how photo uploads had no daily limit and the 300 photos in 24 hours cap, with the options chosen and checks donePR #220·221Two Security Review FindingsLogin lockout and a daily photo limitI chose the optionsCodex wrote testsClaude built and checked1Lockouts anyone could causeKnowing the number was enough tolock that login 15 minutes at a timeFix: known devices skip the number wait2No daily photo limitOne account could upload 43,200photos a day and fill the storageFix: only 300 photos per 24 hours3I chose 'option C'Counting by device alone is dodgedby changing the device valueNo new table; found in session rowsOnly a device hash is stored4I chose 'option A', 300An honest heavy day is about 135Over it: 429, no row and no fileNo alert reaches the head officeNot checked: behavior on a real phone, migration rollbackNew or reinstalled phones still hit the number lockout under attackKeyCount by something the attacker cannot change.FiCl Dev Blog · Post summary figure

These two PRs fix items 4 and 8 from the server security review (parts 1 and 2) of 2026-11-12. PR 220 fixes item 4 (anyone could keep a customer’s phone-number login locked), and PR 221 fixes item 8 (photo uploads had no daily limit). They are separate findings, so I put them side by side in one post.

Both ran on my Windows computer. A Claude Code session (Claude Fable 5.2) read the code, laid out the options, wrote the work instructions, implemented, checked and opened the PR, and Codex (gpt-6.1-terra) wrote the tests. The implementation side did not edit the test files. The final review was codex exec review (Codex’s default model, name unknown). This post has no real passwords or tokens; it only describes file and function names and behavior.

PR 220: Devices That Have Logged In Skip the Number Lockout

What was wrong

Wrong-password attempts were counted by phone number alone. Someone who knew only a customer’s number could keep sending wrong passwords and keep that customer’s phone login locked for 15 minutes at a time.

What changed

A device that has logged in to that account with number and password before skips the number-wide wait. It gets its own counter (the same 5 tries → 1 minute → up to 15 minutes). An unknown device still shares the one number-wide counter, as before.

Chosen approach and rejected options

Claude laid out three options and I picked option C.

PR 221: At Most 300 Photos per User in 24 Hours

What was wrong

A logged-in customer could upload up to 30 photos a minute, with no daily or overall limit. One account (or a stolen session) could upload up to 43,200 photos a day and fill the server storage.

What changed

If a user has uploaded 300 photos in the last 24 hours, the next photo is refused.

Chosen approach and rejected options

Claude laid out the options, and I picked option A with 300 photos. The numbers behind it:

Rejected:

Failure cases

What can break What the system does What the user sees Test
The 301st photo Only that photo is refused with 429; no row or file New message under the photo; memo and other photos kept Server: success just under the limit, refusal after, file count unchanged
24 hours pass Accepted again (no manual unlock) Normal Server: succeeds after moving the clock 24 hours and 1 second
Another user uploads a lot to the same module Counted per user Normal Server: succeeds even if another user has 300 photos
Uploads split across modules Counted together New message Server: two-module total is refused
A stolen session uses up the limit The real customer also cannot upload for up to 24 hours New message. No alert reaches the head office None. The user sees the message, but the head office has no way to know
Several photos uploaded at once go slightly over A few more are accepted Normal None (accepted; damage is small)
The photo table grows so large the count slows down Uploading gets slower The uploading indicator lasts longer None. An index would be added then

Not done this time

A document added alongside: security review item 7 stays as is

On the same day I decided to leave security review item 7 as it is (anyone who knows a phone number can lock an invitation or recovery code by entering 5 wrong codes), and I asked for one line in the decision log plus a decision memo to go into this PR. The code did not change. Claude recommended splitting this into a separate PR since the topic differs from the photo limit, but I chose to keep it in this one.

The reasons and numbers come from another Claude Code session (model unknown) that handled item 7, passed on through a shared note. Claude in this session re-checked them against the same code (8 digits, 5 tries, 7 days and 1 hour, 10 and 30 per minute). That session noted it had not received my decision directly; the basis for the decision is what I said in this session.

How it was checked

PR 220

PR 221

The admin web did not change in either PR, so npm run e2e was not run.

What was not checked

Lessons