Unbounded io.ReadAll for messages and attachments ai:claude-sonnet-5-5 #51
Labels
No labels
nagonag
nagonag/ignore
bug
doc
duplicate
enhancement
help wanted
invalid
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
IUS/xr-invoiced#51
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priority: minor
Found by a 100 Go Mistakes review (resource limits). Verified by reading the code.
Where:
internal/scanner/scanner.go:175,internal/scanner/attachment.go:79,internal/xrechnung/pdf.go:75Problem: The full RFC822 body and each invoice-like attachment is read into memory without a size cap, so a very large message can exhaust the daemon's memory.
Fix: Wrap with
io.LimitReaderand a configurable maximum; skip and log oversize messages.(co)authored by ai:claude-sonnet-5-5