Skip to content

Commit

Permalink
8.15.4
Browse files Browse the repository at this point in the history
- Fix crash if aggregate report timespan is > 24 hours
  • Loading branch information
seanthegeek committed Oct 24, 2024
1 parent 52ccf05 commit debc28c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

8.15.4
------

- Fix crash if aggregate report timespan is > 24 hours

8.15.3
------

Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fi
. venv/bin/activate
pip install .[build]
ruff format .
ruff check .
cd docs
make clean
make html
Expand Down
4 changes: 2 additions & 2 deletions parsedmarc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from parsedmarc.utils import parse_email
from parsedmarc.utils import timestamp_to_human, human_timestamp_to_datetime

__version__ = "8.15.3"
__version__ = "8.15.4"

logger.debug("parsedmarc v{0}".format(__version__))

Expand Down Expand Up @@ -519,7 +519,7 @@ def parse_aggregate_report_xml(
date_range = report["report_metadata"]["date_range"]
if int(date_range["end"]) - int(date_range["begin"]) > 2 * 86400:
_error = "Time span > 24 hours - RFC 7489 section 7.2"
raise InvalidAggregateReport(error)
raise InvalidAggregateReport(_error)
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"]
Expand Down

0 comments on commit debc28c

Please sign in to comment.