1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #32904 -- Made parse_time() more strict.

Thanks Keryn Knight for the report.
This commit is contained in:
abhiabhi94
2021-07-07 12:51:12 +05:30
committed by Mariusz Felisiak
parent 68cc04887b
commit cf6774a53b
2 changed files with 6 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ date_re = _lazy_re_compile(
time_re = _lazy_re_compile(
r'(?P<hour>\d{1,2}):(?P<minute>\d{1,2})'
r'(?::(?P<second>\d{1,2})(?:[\.,](?P<microsecond>\d{1,6})\d{0,6})?)?'
r'(?::(?P<second>\d{1,2})(?:[\.,](?P<microsecond>\d{1,6})\d{0,6})?)?$'
)
datetime_re = _lazy_re_compile(