Implement available_space() properly instead of returning u64::MAX #2

Open
opened 2026-07-25 11:17:12 +00:00 by GKaszewski · 0 comments
Owner

Severity: High

In crates/adapters/storage/src/local_file_storage.rs:

async fn available_space(&self) -> Result<u64, DomainError> {
    // Simple stub: return a large number
    Ok(u64::MAX)
}

This is a dangerous stub. If any code ever relies on this for quota enforcement or pre-flight checks, it will silently pass. Implement a real statvfs call or return an error indicating it's not implemented.

**Severity: High** In `crates/adapters/storage/src/local_file_storage.rs`: ```rust async fn available_space(&self) -> Result<u64, DomainError> { // Simple stub: return a large number Ok(u64::MAX) } ``` This is a dangerous stub. If any code ever relies on this for quota enforcement or pre-flight checks, it will silently pass. Implement a real `statvfs` call or return an error indicating it's not implemented.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-photos#2