[RELIABILITY] Unbounded Temporary File Creation in website_handlers #22
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
geomind_code/my_fs#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
get_file_from_flistfunction inwebsite_handlers.rs(Lines 26-29) creates a newtempfile::NamedTempFileand writes the entire flist content to it on every single file request.Risk: This is a massive I/O bottleneck and a potential Denial of Service (DoS) vector. A high volume of requests will saturate disk I/O and could fill up the
/tmppartition because files are written and opened repeatedly.Fix: Implement a cache for "opened" flist databases or use an in-memory SQLite implementation if the flists are small enough.