3.9.3 - Fix crash when forensic recorts are missing Arrival-Date

This commit is contained in:
Sean Whalen
2018-09-06 15:09:44 -04:00
parent 92f4085386
commit b9c4c62b00
3 changed files with 11 additions and 3 deletions

View File

@@ -1,5 +1,10 @@
3.9.3
-----
- Fix crash when forensic recorts are missing `Arrival-Date`
3.9.2
------
-----
- Fix PEP 8 spacing
- Update build script to fail when CI tests fail

View File

@@ -43,7 +43,7 @@ import imapclient.exceptions
import dateparser
import mailparser
__version__ = "3.9.2"
__version__ = "3.9.3"
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
@@ -744,6 +744,9 @@ def parse_forensic_report(feedback_report, sample, sample_headers_only,
arrival_utc = arrival_utc.strftime("%Y-%m-%d %H:%M:%S")
parsed_report["arrival_date_utc"] = arrival_utc
if "arrival_date_utc" not in parsed_report:
raise InvalidForensicReport("Missing Arrival-Date")
ip_address = parsed_report["source_ip"]
parsed_report["source"] = _get_ip_address_info(ip_address,
nameservers=nameservers,

View File

@@ -14,7 +14,7 @@ from setuptools import setup
from codecs import open
from os import path
__version__ = "3.9.2"
__version__ = "3.9.3"
description = "A Python package and CLI for parsing aggregate and " \
"forensic DMARC reports"