diff options
| author | Adam Johnson <me@adamj.eu> | 2022-09-02 09:44:05 +0100 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2022-10-04 09:12:42 +0200 |
| commit | 9d656ea51d9ea7105c0c0785783ac29d426a7d25 (patch) | |
| tree | 212f2bd6941f620a763261d58dcfe7bdf29d62cf /tests | |
| parent | 7843c43c49d3845a1cbebfaaf71f2f0c2a9d8fce (diff) | |
[4.1.x] Fixed CVE-2022-41323 -- Prevented locales being interpreted as regular expressions.
Thanks to Benjamin Balder Bach for the report.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/i18n/patterns/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/i18n/patterns/tests.py b/tests/i18n/patterns/tests.py index 43d95ff668..0b104ff548 100644 --- a/tests/i18n/patterns/tests.py +++ b/tests/i18n/patterns/tests.py @@ -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): """ |
