matcha
matcha copied to clipboard
BUG: Cache corruption when concurrent folder updates occur
Describe the bug: Folder cache and body cache can corrupt when multiple goroutines write simultaneously. No mutex protection around cache file writes in folder_cache.go and cache.go.
To reproduce:
- Enable multiple accounts
- Trigger simultaneous folder sync
- Both write to cache files concurrently
- JSON corruption or partial writes possible
Expected behavior: Synchronize cache writes with mutex or file locking.
Additional context:
- Files: config/folder_cache.go, config/cache.go
- No sync.Mutex around SaveFolders() or cache writes
- Multiple accounts can trigger concurrent writes
- Severity: High - data corruption
- Complexity: High - needs thread-safe cache design
This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.
Closing due to inactivity. Reopen if still relevant.