mirror of https://github.com/python/cpython
bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with importlib_metadata 4.10.1) (GH-30803)
This commit is contained in:
parent
b0898f4aa9
commit
51c3e28c8a
|
@ -156,8 +156,8 @@ class EntryPoint(DeprecatedTuple):
|
|||
|
||||
pattern = re.compile(
|
||||
r'(?P<module>[\w.]+)\s*'
|
||||
r'(:\s*(?P<attr>[\w.]+))?\s*'
|
||||
r'(?P<extras>\[.*\])?\s*$'
|
||||
r'(:\s*(?P<attr>[\w.]+)\s*)?'
|
||||
r'((?P<extras>\[.*\])\s*)?$'
|
||||
)
|
||||
"""
|
||||
A regular expression describing the syntax for an entry point,
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
In ``importlib.metadata.EntryPoint.pattern``, avoid potential REDoS by
|
||||
limiting ambiguity in consecutive whitespace.
|
Loading…
Reference in New Issue