mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
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
4771a1694b
commit
e5ea284294
@@ -346,7 +346,7 @@ class LocalePrefixPattern:
|
||||
@property
|
||||
def regex(self):
|
||||
# This is only used by reverse() and cached in _reverse_dict.
|
||||
return re.compile(self.language_prefix)
|
||||
return re.compile(re.escape(self.language_prefix))
|
||||
|
||||
@property
|
||||
def language_prefix(self):
|
||||
|
||||
Reference in New Issue
Block a user