Normalize aggregate report IDs

This commit is contained in:
Sean Whalen
2018-03-20 11:22:28 -04:00
parent 4090f10d6f
commit d13be1aab4
2 changed files with 10 additions and 2 deletions
+6 -2
View File
@@ -1,10 +1,14 @@
3.0.0
-----
### New features
- Add option to select the IMAP folder where reports are stored
- Add options to send data to Elasticsearch
### Changes
- Detect aggregate report email attachments by file content rather than
file extension
- In an aggregate report's `org_name` is a FQDN, the base is used
- Add option to select the IMAP folder where reports are stored
- Add options to send data to Elasticsearch
- Normalize aggregate report IDs
2.1.2
-----
+4
View File
@@ -424,6 +424,10 @@ def parse_aggregate_report_xml(xml, nameservers=None, timeout=6.0):
extra = report_metadata["extra_contact_info"]
new_report_metadata["org_extra_contact_info"] = extra
new_report_metadata["report_id"] = report_metadata["report_id"]
report_id = new_report_metadata["report_id"]
report_id = report_id.replace("<",
"").replace(">", "").split("@")[0]
report_metadata["report_id"] = report_id
date_range = report["report_metadata"]["date_range"]
date_range["begin"] = _timestamp_to_human(date_range["begin"])
date_range["end"] = _timestamp_to_human(date_range["end"])