Skip to content

load_users() reads the entire user file on every login and register request #114

Description

@ameyvaidya44

Title: No caching on users.json — file read on every authenticated request

Description: In main.py, load_users() opens and parses users.json on every call to /login, /register, and save_user. Under concurrent load this causes repeated disk I/O and a race condition — two simultaneous registrations could both read the same file, both add their user, and one write overwrites the other, silently losing a registration. There is no file lock, no in-memory cache, and no atomic write pattern.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions