mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-04-04 12:48:53 +00:00
3.9.3 - Fix crash when forensic recorts are missing Arrival-Date
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user