fix: handle XML namespaces in DMARCParser for web.de/gmx.net compatibility

Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/56611674-6132-435f-ab36-728464bb9157

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-29 17:59:13 +00:00
parent f7200d973c
commit 0844981bc0
3 changed files with 89 additions and 1 deletions
+48
View File
@@ -47,3 +47,51 @@ SAMPLE_XML = """\
</record>
</feedback>
"""
SAMPLE_XML_WITH_NAMESPACE = """\
<?xml version="1.0" encoding="UTF-8" ?>
<feedback xmlns="urn:ietf:params:xml:ns:dmarc-2.0">
<report_metadata>
<org_name>web.de</org_name>
<email>dmarc@web.de</email>
<report_id>987654321</report_id>
<date_range>
<begin>1597449600</begin>
<end>1597535999</end>
</date_range>
</report_metadata>
<policy_published>
<domain>example.com</domain>
<adkim>r</adkim>
<aspf>r</aspf>
<p>reject</p>
<sp>reject</sp>
<pct>100</pct>
</policy_published>
<record>
<row>
<source_ip>198.51.100.5</source_ip>
<count>3</count>
<policy_evaluated>
<disposition>reject</disposition>
<dkim>pass</dkim>
<spf>pass</spf>
</policy_evaluated>
</row>
<identifiers>
<header_from>example.com</header_from>
</identifiers>
<auth_results>
<dkim>
<domain>example.com</domain>
<result>pass</result>
<selector>s1</selector>
</dkim>
<spf>
<domain>example.com</domain>
<result>pass</result>
</spf>
</auth_results>
</record>
</feedback>
"""