HeadlinesBriefing favicon HeadlinesBriefing.com

30‑Day Flask App Builds One‑Time File Sharing

DEV Community •
×

A developer named Aayushbankar completed a 30‑day build of a self‑destructing file‑sharing service. Using Flask 3.13, Docker, and Redis with TTL, the app lets users upload a file or text, generate a one‑time link, and delete the data immediately after download in a containerized environment for rapid deployment.

Security rests on ChaCha20‑Poly1305 for encryption and Argon2id for password hashing, both memory‑hard and constant‑time. The design keeps the key off the server, ensuring zero‑knowledge protection. Files are stored in Redis with a five‑hour TTL, then purged by an atomic delete pipeline after the user downloads and link.

On launch day, a race condition in the password‑retry counter let attackers submit fifty guesses for the price of one. The fix was a Redis HINCRBY atomic increment, eliminating the read‑modify‑write flaw and restoring the intended five‑attempt limit before the service went live and users could trust securely.

The project, now live at onetimeshare.onrender.com, showcases how lightweight stacks can deliver strong security without enterprise overhead. Future plans include S3 support for larger files, a public API, and a mobile‑optimized interface. The journey highlights the importance of atomic operations and final audits for developers building secure tools.