BUG: No rate limiting on remote image fetching
Describe the bug view/html.go fetches remote images from emails without rate limiting. Malicious email with thousands of image URLs could trigger DoS by overwhelming network/memory.
To reproduce Email with 1000 remote images would trigger 1000 HTTP requests.
view/html.go has maxImageSize limit but no rate/count limit.
Expected behavior Limit number of remote images fetched per email (e.g., max 50).
Additional context
- Good first issue
- DoS vector: malicious emails with many images
- LRU cache exists but doesn't prevent initial fetch
- Related to resource exhaustion
Suggested fix:
const maxRemoteImagesPerEmail = 50
// Track count and skip after limit
if imageCount >= maxRemoteImagesPerEmail {
// Skip or show placeholder
}
OS All platforms
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.