Skip to content

Commit

Permalink
handle isnumeric
Browse files Browse the repository at this point in the history
Signed-off-by: Rafał Safin <[email protected]>
  • Loading branch information
Rafał Safin committed Oct 25, 2024
1 parent 003303d commit ff549d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions minio/timeutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def from_http_header(value: str) -> datetime:
raise ValueError(
f"time data {value} does not match HTTP header format"
)
if not value[5:7].isnumeric():
raise ValueError(
f"time data {value} does not match HTTP header format"
)
day = int(value[5:7])

if value[8:11] not in _MONTHS:
Expand Down

0 comments on commit ff549d0

Please sign in to comment.