matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: Missing defer on temp file cleanup in attach handler

Open andrinoff opened this issue 7 months ago • 2 comments

Describe the bug: Temp files created for attachments may not be cleaned up if errors occur after creation.

To reproduce:

  1. Check attachment download code paths
  2. If error occurs after temp file created but before cleanup
  3. 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

andrinoff avatar Apr 16 '26 20:04 andrinoff

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.

floatpanebot avatar May 17 '26 05:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar May 31 '26 06:05 floatpanebot