From cf6774a53b40243d35183b4300a9385b68fd8c75 Mon Sep 17 00:00:00 2001 From: abhiabhi94 <13880786+abhiabhi94@users.noreply.github.com> Date: Wed, 7 Jul 2021 12:51:12 +0530 Subject: Fixed #32904 -- Made parse_time() more strict. Thanks Keryn Knight for the report. --- django/utils/dateparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/utils/dateparse.py') 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\d{1,2}):(?P\d{1,2})' - r'(?::(?P\d{1,2})(?:[\.,](?P\d{1,6})\d{0,6})?)?' + r'(?::(?P\d{1,2})(?:[\.,](?P\d{1,6})\d{0,6})?)?$' ) datetime_re = _lazy_re_compile( -- cgit v1.3