Files
DeepTutor/tests/multi_user
supermario_leo f8cf0224b9 fix(multi_user): keep an unreadable account store instead of resetting it
A users.json that exists but cannot be read as a JSON object was treated as
an empty store, so the next write replaced every account with a single record
promoted to admin, and is_first_user() reopened /register for anyone.

Separate "no store yet" from "store is unusable": an absent, zero-byte,
whitespace-only, byte-order-mark-only, null, [] or JSON-scalar document holds no
accounts and still bootstraps; invalid JSON and a non-empty array are reported.
load_users() reports the problem once a minute per path, and the single write
funnel refuses to replace the operator's bytes, raising AccessError(503) for an
unreadable store and for a write the volume rejects, including a first boot on
an unwritable volume.

The caller-facing detail names the bare file and the remedy; the parse failure
and the absolute path stay in the operator log, because OS error text embeds the
path in a repr-escaped form that cannot be redacted reliably.
2026-11-30 06:49:38 +08:00
..
2026-06-11 20:03:34 +08:00
2026-05-12 02:20:30 +08:00
2026-09-21 02:30:40 +08:00