summaryrefslogtreecommitdiff
path: root/django/utils/dateparse.py
diff options
context:
space:
mode:
authorabhiabhi94 <13880786+abhiabhi94@users.noreply.github.com>2021-07-07 12:51:12 +0530
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-07-07 12:08:43 +0200
commitcf6774a53b40243d35183b4300a9385b68fd8c75 (patch)
tree1b2e19d6d70ea3a5a9f9fa6203feecaad1da8190 /django/utils/dateparse.py
parent68cc04887b3c5b7ce8f28eaae5de266db99ca9a6 (diff)
downloaddjango-cf6774a53b40243d35183b4300a9385b68fd8c75.tar.gz
Fixed #32904 -- Made parse_time() more strict.
Thanks Keryn Knight for the report.
Diffstat (limited to 'django/utils/dateparse.py')
-rw-r--r--django/utils/dateparse.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/dateparse.py b/django/utils/dateparse.py
index 60840933d5..238c727cb1 100644
--- a/django/utils/dateparse.py
+++ b/django/utils/dateparse.py
@@ -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(