- Fix handling of non-domain organization names (PR #411 fixes issue #410)
- Ignore rua reports with a date range that is too long to be valid (PR #408 fixes issue #282)
This commit is contained in:
Sean Whalen
2023-05-14 20:41:44 -04:00
parent 5a659ea578
commit e5e7a6fe75
2 changed files with 9 additions and 1 deletions
+6
View File
@@ -1,6 +1,12 @@
Changelog
=========
8.6.1
-----
- Fix handling of non-domain organization names (PR #411 fixes issue #410)
- Skip processing of aggregate reports with a date range that is too long to be valid (PR #408 fixes issue #282)
8.6.0
-----
+3 -1
View File
@@ -267,7 +267,9 @@ def parse_aggregate_report_xml(xml, ip_db_path=None, offline=False,
new_report_metadata["report_id"] = report_id
date_range = report["report_metadata"]["date_range"]
if (int(date_range["end"]) - int(date_range["begin"]) > 2*86400):
raise InvalidAggregateReport("The begin and end fields span too many hours, should be max 24 hours according to RFC 7489 section 7.2")
raise InvalidAggregateReport("The begin and end fields span too \
many hours, should be max 24 hours \
according to RFC 7489 section 7.2")
date_range["begin"] = timestamp_to_human(date_range["begin"])
date_range["end"] = timestamp_to_human(date_range["end"])
new_report_metadata["begin_date"] = date_range["begin"]