mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[4.1.x] Fixed CVE-2022-41323 -- Prevented locales being interpreted as regular expressions.
Thanks to Benjamin Balder Bach for the report.
This commit is contained in:
committed by
Carlton Gibson
parent
7843c43c49
commit
9d656ea51d
@@ -215,6 +215,12 @@ class URLTranslationTests(URLTestCaseBase):
|
||||
expected_link,
|
||||
)
|
||||
|
||||
def test_locale_not_interepreted_as_regex(self):
|
||||
with translation.override("e("):
|
||||
# Would previously error:
|
||||
# re.error: missing ), unterminated subpattern at position 1
|
||||
reverse("users")
|
||||
|
||||
|
||||
class URLNamespaceTests(URLTestCaseBase):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user