matcha
matcha copied to clipboard
BUG: Missing defer on temp file cleanup in attach handler
Describe the bug: Temp files created for attachments may not be cleaned up if errors occur after creation.
To reproduce:
- Check attachment download code paths
- If error occurs after temp file created but before cleanup
- Temp files accumulate in system temp directory
Expected behavior: Use defer to ensure temp file cleanup even on error paths.
Additional context:
- Review view/html.go and attachment handling code
- Severity: Low-Medium - disk space leak
- Fix: Add defer os.Remove after temp file creation
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.