diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb8c9d1..97c4454 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+3.5.1
+-----
+
+- Fix dashboard message counts for source IP addresses visualizations
+- Improve dashboard loading times
+- Improve dashboard layout
+- Add country rankings to the dashboards
+- Fix crash when parsing report with empty
+
+
3.5.0
-----
- Use Cloudflare's public DNS resolvers by default instead of Google's
diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py
index baaa1fa..6a62cf7 100644
--- a/parsedmarc/__init__.py
+++ b/parsedmarc/__init__.py
@@ -42,7 +42,7 @@ import imapclient.exceptions
import dateparser
import mailparser
-__version__ = "3.5.0"
+__version__ = "3.5.1"
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
@@ -351,7 +351,10 @@ def _parse_report_record(record, nameservers=None, timeout=6.0):
new_record["policy_evaluated"] = new_policy_evaluated
new_record["identifiers"] = record["identifiers"].copy()
new_record["auth_results"] = OrderedDict([("dkim", []), ("spf", [])])
- auth_results = record["auth_results"].copy()
+ if record["auth_results"] is not None:
+ auth_results = record["auth_results"].copy()
+ else:
+ auth_results = new_record["auth_results"].copy()
if "dkim" in auth_results:
if type(auth_results["dkim"]) != list:
auth_results["dkim"] = [auth_results["dkim"]]
@@ -492,7 +495,8 @@ def parse_aggregate_report_xml(xml, nameservers=None, timeout=6.0):
except KeyError as error:
raise InvalidAggregateReport("Missing field: "
"{0}".format(error.__str__()))
-
+ except AttributeError:
+ raise InvalidAggregateReport("Report missing required section")
def extract_xml(input_):
"""
diff --git a/samples/example.net!example.com!1529366400!1529452799.xml.sample b/samples/example.net!example.com!1529366400!1529452799.xml.sample
new file mode 100644
index 0000000..00aa962
--- /dev/null
+++ b/samples/example.net!example.com!1529366400!1529452799.xml.sample
@@ -0,0 +1,39 @@
+
+
+ 1.0
+
+ example.net
+ postmaster@example.net
+ b043f0e264cf4ea995e93765242f6dfb
+
+ 1529366400
+ 1529452799
+
+
+
+ example.com
+ r
+ r
+ none
+ none11
+ 100
+ 0
+
+
+
+ 199.230.200.36
+ 1
+
+ none
+ fail
+ fail
+
+
+
+ example.com
+ example.com
+
+
+
+
+
diff --git a/setup.py b/setup.py
index 2f158e8..5ddc096 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ from setuptools import setup
from codecs import open
from os import path
-__version__ = "3.5.0"
+__version__ = "3.5.1"
description = "A Python package and CLI for parsing aggregate and " \
"forensic DMARC reports"