Skip to content

Commit

Permalink
handle OverflowError in timed unsign on 32-bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmueller authored and davidism committed Mar 24, 2022
1 parent faa28bc commit 3edfbbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -3,6 +3,8 @@ Version 2.1.2

Unreleased

- Handle date overflow in timed unsign on 32-bit systems. :pr:`299`


Version 2.1.1
-------------
Expand Down
3 changes: 2 additions & 1 deletion src/itsdangerous/timed.py
Expand Up @@ -126,8 +126,9 @@ def unsign(
if ts_int is not None:
try:
ts_dt = self.timestamp_to_datetime(ts_int)
except (ValueError, OSError) as exc:
except (ValueError, OSError, OverflowError) as exc:
# Windows raises OSError
# 32-bit raises OverflowError
raise BadTimeSignature(
"Malformed timestamp", payload=value
) from exc
Expand Down

0 comments on commit 3edfbbb

Please sign in to comment.