Normalize attachment filename/content type before extension checks #14
Labels
No labels
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
finding
mod-nag
mod-nag
mod-nag
mod-nag
mod-nag/ignore
mod-nag/ignore
mod-nag/ignore
mod-nag/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#14
Loading…
Add table
Add a link
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?
Problem
XRechnung detection uses case-sensitive suffix checks for attachment filenames.
Reference:
internal/xrechnung/detector.go:19.Attachments like
INVOICE.XMLwithapplication/octet-streamwill not be detected even though they may contain valid invoice XML.Expected
Filename extension and content type checks should be normalized before matching.
Suggested fix
Lowercase the filename extension and content type before comparing, and add tests for uppercase
.XML/.PDFnames.Branch renamed per convention:
Old: regression/issue-14-normalize-attachment-name
New: fix/14-normalize-attachment-name
The old remote branch has been deleted.
Fix branch pushed: fix/14-normalize-attachment-name-claude
Normalizes filename to lowercase at the start of IsXRechnung so .XML and .PDF extensions are recognized regardless of case. Regression test passes.
Implementation branch: fix/14-normalize-attachment-name-codex
Fixed in
b801292with test coverage in2f47726, merged byacde9a4. Filename extensions and content types are normalized before XRechnung dispatch.