mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-07-28 19:34:55 +00:00
The <feedback> XML root element (anchored at the top of parse_aggregate_report_xml) is what identifies an aggregate report; <version> is optional metadata per RFC 7489 Appendix C. The "draft" fallback only covered a fully absent <version>: an empty <version/> (which xmltodict parses as None) or a whitespace-only value produced xml_schema=None, which the flat-row serializer coerced to "" — and any consumer detecting aggregate rows by a non-empty xml_schema, such as the Google SecOps CBN parser's report-type cascade, silently dropped the row. The fallback now applies unless <version> carries non-empty text (attribute-wrapped values are unwrapped via _text like other elements). The regression test fails on the previous code with xml_schema=None != "draft". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>